bin/autoproj_bootstrap in autoproj-1.9.7.rc7 vs bin/autoproj_bootstrap in autoproj-1.9.7.rc9
- old
+ new
@@ -315,12 +315,12 @@
# Package manager interface for systems that use pacman (i.e. arch) as
# their package manager
class PacmanManager < ShellScriptManager
def initialize
super(['pacman'], true,
- "pacman '%s'",
- "pacman -Sy --noconfirm '%s'")
+ "pacman -Sy --needed '%s'",
+ "pacman -Sy --needed --noconfirm '%s'")
end
end
# Package manager interface for systems that use emerge (i.e. gentoo) as
# their package manager
@@ -497,10 +497,19 @@
# Return the directory in which RubyGems package should be installed
def self.gem_home
ENV['AUTOPROJ_GEM_HOME'] || File.join(Autoproj.root_dir, ".gems")
end
+
+ # Returns the set of default options that are added to gem
+ #
+ # By default, we add --no-user-install to un-break distributions
+ # like Arch that set --user-install by default (thus disabling the
+ # role of GEM_HOME)
+ def self.default_install_options
+ @default_install_options ||= ['--no-user-install', '--no-format-executable']
+ end
def initialize
super(['gem'])
@installed_gems = Set.new
end
@@ -542,11 +551,11 @@
end
def install(gems)
guess_gem_program
- base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install', '--no-format-executable']
+ base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install', *GemManager.default_install_options]
if !GemManager.with_doc
base_cmdline << '--no-rdoc' << '--no-ri'
end
if GemManager.with_prerelease
@@ -854,11 +863,10 @@
PackageManagers::PipManager]
OS_PACKAGE_HANDLERS = {
'debian' => 'apt-dpkg',
'gentoo' => 'emerge',
'arch' => 'pacman',
- 'manjarolinux' => 'pacman',
'fedora' => 'yum',
'darwin' => 'port',
'opensuse' => 'zypper'
}
@@ -1041,11 +1049,11 @@
else
names, versions = user_os.split(':')
@operating_system = [names.split(','), versions.split(',')]
end
else
- Autoproj.message " autodetecting the operating system"
+ Autobuild.progress :operating_system_autodetection, "autodetecting the operating system"
lsb_name, lsb_versions = os_from_lsb
if lsb_name
if lsb_name != 'debian' && File.exists?("/etc/debian_version")
@operating_system = [[lsb_name, "debian"], lsb_versions]
elsif lsb_name != 'arch' && File.exists?("/etc/arch-release")
@@ -1109,10 +1117,13 @@
versions += ['default']
end
@operating_system = [names, versions]
Autoproj.change_option('operating_system', @operating_system, true)
+ Autobuild.progress :operating_system_autodetection, "operating system: #{(names - ['default']).join(",")} - #{(versions - ['default']).join(",")}"
@operating_system
+ ensure
+ Autobuild.progress_done :operating_system_autodetection
end
def self.os_from_lsb
has_lsb_release = nil
begin