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
@return [Workspace] the workspace
Public Class Methods
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
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
Perform additional configuration required for the package manager
# File lib/autoproj/package_managers/manager.rb, line 72 def configure_manager end
# File lib/autoproj/package_managers/manager.rb, line 15 def enabled? !!@enabled end
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
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
# File lib/autoproj/package_managers/manager.rb, line 21 def silent? !!@silent end
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