Sha256: 68613420a852179bd7f4758966e368eadff14feeef7720298c2e0fddbe2e4371

Contents?: true

Size: 1.44 KB

Versions: 2

Compression:

Stored size: 1.44 KB

Contents

module Autoproj
    module PackageManagers
        # 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.
        class Manager
            # @return [Workspace] the workspace
            attr_reader :ws

            attr_writer :enabled
            def enabled?; !!@enabled end

            attr_writer :silent
            def silent?; !!@silent end

            attr_writer :call_while_empty
            def call_while_empty?; !!@call_while_empty end

            # Create a package manager registered with various names
            #
            # @param [Array<String>] names the package manager names. It MUST be
            #   different from the OS names that autoproj uses. See the comment
            #   for OS_PACKAGE_HANDLERS for an explanation
            def initialize(ws)
                @ws = ws
                @enabled = true
                @silent = true
                @call_while_empty = false
            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
            def initialize_environment
            end
        end
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
autoproj-2.0.0.rc37 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc36 lib/autoproj/package_managers/manager.rb