Sha256: b3b428589d963dc05d3ced650b2a0875d3acf75d6065f8ac2d0cad3a793a174b

Contents?: true

Size: 1.42 KB

Versions: 26

Compression:

Stored size: 1.42 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

            # 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
            end

            # The primary name for this package manager
            def name
                names.first
            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

26 entries across 26 versions & 1 rubygems

Version Path
autoproj-2.0.0.rc30 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc29 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc28 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc27 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc26 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc25 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc24 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc23 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc22 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc21 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc20 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc19 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc18 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc17 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc16 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc15 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc14 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc13 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc12 lib/autoproj/package_managers/manager.rb
autoproj-2.0.0.rc11 lib/autoproj/package_managers/manager.rb