Sha256: b8872f93d274e0adc81fd9c27b37d9919bf7fe262e949b962c7e06cc22e8ca99

Contents?: true

Size: 1.51 KB

Versions: 16

Compression:

Stored size: 1.51 KB

Contents

require 'autoproj/cli/inspection_tool'

module Autoproj
    module CLI
        class OSDeps < InspectionTool
            def run(user_selection, update: true, **options)
                initialize_and_load
                if options[:system_info]
                    os_names, os_versions = ws.os_package_resolver.operating_system
                    os_package_manager_names = OSPackageResolver::OS_PACKAGE_MANAGERS.values
                    os_indep_managers = ws.os_package_installer.package_managers.
                        each_key.find_all do |name, manager|
                            !os_package_manager_names.include?(name)
                        end
                    puts "OS Names:    #{(os_names - ['default']).join(", ")}"
                    puts "OS Versions: #{(os_versions - ['default']).join(", ")}"
                    puts "OS Package Manager: #{ws.os_package_resolver.os_package_manager}"
                    puts "Available Package Managers: #{os_indep_managers.sort.join(", ")}"
                    return
                end

                _, osdep_packages, resolved_selection, _ =
                    finalize_setup(user_selection)

                shell_helpers = options.fetch(:shell_helpers, ws.config.shell_helpers?)

                ws.install_os_packages(
                    osdep_packages,
                    run_package_managers_without_packages: true,
                    install_only: !update)
                export_env_sh(shell_helpers: shell_helpers)
            end
        end
    end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
autoproj-2.7.1 lib/autoproj/cli/osdeps.rb
autoproj-2.7.0 lib/autoproj/cli/osdeps.rb
autoproj-2.6.1 lib/autoproj/cli/osdeps.rb
autoproj-2.6.0 lib/autoproj/cli/osdeps.rb
autoproj-2.5.1 lib/autoproj/cli/osdeps.rb
autoproj-2.5.0 lib/autoproj/cli/osdeps.rb
autoproj-2.5.0.pre1 lib/autoproj/cli/osdeps.rb
autoproj-2.4.0 lib/autoproj/cli/osdeps.rb
autoproj-2.3.1 lib/autoproj/cli/osdeps.rb
autoproj-2.3.0 lib/autoproj/cli/osdeps.rb
autoproj-2.2.2 lib/autoproj/cli/osdeps.rb
autoproj-2.2.1 lib/autoproj/cli/osdeps.rb
autoproj-2.2.0 lib/autoproj/cli/osdeps.rb
autoproj-2.1.2 lib/autoproj/cli/osdeps.rb
autoproj-2.1.1 lib/autoproj/cli/osdeps.rb
autoproj-2.1.0 lib/autoproj/cli/osdeps.rb