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.7.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.6.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.6.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.5.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.5.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.5.0.pre1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.4.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.3.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.3.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.2.2 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.2.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.2.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.1.2 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.1.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.1.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.1.0.rc1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.3 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.2 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.0.0 lib/autoproj/package_managers/unknown_os_manager.rb