Class: Autoproj::PackageManagers::UnknownOSManager
- Defined in:
- lib/autoproj/package_managers/unknown_os_manager.rb
Overview
Dummy package manager used for unknown OSes. It simply displays a message to the user when packages are needed
Instance Attribute Summary
Attributes inherited from Manager
Instance Method Summary collapse
-
#initialize(ws) ⇒ UnknownOSManager
constructor
A new instance of UnknownOSManager.
- #install(osdeps) ⇒ Object
- #osdeps_interaction_unknown_os(osdeps) ⇒ Object
Methods inherited from Manager
#call_while_empty?, #configure_manager, #enabled?, #initialize_environment, #os_dependencies, #silent?, #strict?
Constructor Details
#initialize(ws) ⇒ UnknownOSManager
Returns a new instance of UnknownOSManager.
6 7 8 9 |
# File 'lib/autoproj/package_managers/unknown_os_manager.rb', line 6 def initialize(ws) super(ws) @installed_osdeps = Set.new end |
Instance Method Details
#install(osdeps) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/autoproj/package_managers/unknown_os_manager.rb', line 26 def install(osdeps) if silent? false else osdeps = osdeps.to_set osdeps -= @installed_osdeps result = osdeps_interaction_unknown_os(osdeps) unless osdeps.empty? @installed_osdeps |= osdeps result end end |
#osdeps_interaction_unknown_os(osdeps) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/autoproj/package_managers/unknown_os_manager.rb', line 11 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 |