class Autoproj::PackageManagers::Manager

Base class for all package managers. Subclasses must add the install(packages) method and may add the filter_uptodate_packages(packages) method

Package managers must be registered in PACKAGE_HANDLERS and (if applicable) OS_PACKAGE_HANDLERS.

Attributes

enabled[W]
silent[W]
ws[R]

@return [Workspace] the workspace

Public Class Methods

new(ws) click to toggle source

Create a package manager

@param [Workspace] ws the underlying workspace

# File lib/autoproj/package_managers/manager.rb, line 58
def initialize(ws)
    @ws = ws
    @enabled = true
    @silent = true
end

Public Instance Methods

call_while_empty?() click to toggle source

Whether this package manager should be called even if no packages should be installed

This is needed if the installer has ways to get specifications of packages to install through other means than the osdep system, as e.g. {BundlerManager} that would install gems listed in autoproj/Gemfile

# File lib/autoproj/package_managers/manager.rb, line 32
def call_while_empty?
    false
end
configure_manager() click to toggle source

Perform additional configuration required for the package manager

# File lib/autoproj/package_managers/manager.rb, line 72
def configure_manager
end
enabled?() click to toggle source
# File lib/autoproj/package_managers/manager.rb, line 15
def enabled?
    !!@enabled
end
initialize_environment() click to toggle source

Overload to perform initialization of environment variables in order to have a properly functioning package manager

This is e.g. needed for python pip or rubygems

# File lib/autoproj/package_managers/manager.rb, line 68
def initialize_environment
end
os_dependencies() click to toggle source

If this package manager depends on OS packages, they should be added here

# File lib/autoproj/package_managers/manager.rb, line 51
def os_dependencies
    []
end
silent?() click to toggle source
# File lib/autoproj/package_managers/manager.rb, line 21
def silent?
    !!@silent
end
strict?() click to toggle source

Whether this package manager needs to maintain a list of all the packages that are needed for the whole installation (true), or needs only to be called with packages to install

OS package managers are generally non-strict (once a package is installed, it’s available to all). Package managers like {BundlerManager} are strict as they maintain a list of gems that are then made available to the whole installation

The default is false, reimplement in subclasses to return true

# File lib/autoproj/package_managers/manager.rb, line 46
def strict?
    false
end