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.14.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.13.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.12.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.12.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.11.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.10.2 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.10.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.10.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.9.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.8 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.7 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.6 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.5 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.5.b1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.4 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.3 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.2 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.1 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.8.0 lib/autoproj/package_managers/unknown_os_manager.rb
autoproj-2.7.1 lib/autoproj/package_managers/unknown_os_manager.rb