Class: Autoproj::PackageManagers::UnknownOSManager

Inherits:
Manager
  • Object
show all
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

#enabled, #silent, #ws

Instance Method Summary collapse

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 "  \#{Autoproj.color('The build process requires some other software packages to be installed on our operating system', :bold)}\n  \#{Autoproj.color('If they are already installed, simply ignore this message', :red)}\n\n    \#{osdeps.to_a.sort.join(\"\\n    \")}\n\n    EOMSG\n    print Autoproj.color(\"Press ENTER to continue\", :bold)\n    STDOUT.flush\n    STDIN.readline\n    puts\n    nil\nend\n"