Sha256: 40431a1a1d53054f0444edf4de15419f69bf6758efff8ce18dd5c46c32582dae

Contents?: true

Size: 1.33 KB

Versions: 78

Compression:

Stored size: 1.33 KB

Contents

module Autoproj
    module PackageManagers
        # Dummy package manager used for unknown OSes. It simply displays a
        # message to the user when packages are needed
        class UnknownOSManager < Manager
            def initialize(ws)
                super(ws)
                @installed_osdeps = Set.new
            end

            def osdeps_interaction_unknown_os(osdeps)
                puts <<-EOMSG
  #{Autoproj.color("The build process requires some other software packages to be installed on our operating system", :bold)}
  #{Autoproj.color("If they are already installed, simply ignore this message", :red)}

    #{osdeps.to_a.sort.join("\n    ")}

                EOMSG
                print Autoproj.color("Press ENTER to continue", :bold)
                STDOUT.flush
                STDIN.readline
                puts
                nil
            end

            def install(osdeps)
                if silent?
                    return false
                else
                    osdeps = osdeps.to_set
                    osdeps -= @installed_osdeps
                    if !osdeps.empty?
                        result = osdeps_interaction_unknown_os(osdeps)
                    end
                    @installed_osdeps |= osdeps
                    return result
                end
            end
        end
    end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
autoproj-2.0.0.rc22 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc21 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc20 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc19 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc18 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc17 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc16 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc15 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc14 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc13 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc12 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc11 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc10 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc9 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc8 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc6 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc5 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0.rc4 lib/autoproj/package_managers/unknown_os_manager.rb