bin/autoproj_bootstrap in autoproj-1.9.7.rc3 vs bin/autoproj_bootstrap in autoproj-1.9.7.rc4

- old
+ new

@@ -233,18 +233,20 @@ super(names) @needs_locking, @user_install_cmd, @auto_install_cmd = needs_locking, user_install_cmd, auto_install_cmd end - def generate_user_os_script(os_packages) + def generate_user_os_script(os_packages, options = Hash.new) + user_install_cmd = options[:user_install_cmd] || self.user_install_cmd if user_install_cmd (user_install_cmd % [os_packages.join("' '")]) else generate_auto_os_script(os_packages) end end - def generate_auto_os_script(os_packages) + def generate_auto_os_script(os_packages, options = Hash.new) + auto_install_cmd = options[:auto_install_cmd] || self.auto_install_cmd (auto_install_cmd % [os_packages.join("' '")]) end def osdeps_interaction(os_packages, shell_script) if OSDependencies.force_osdeps @@ -278,15 +280,15 @@ STDIN.readline puts false end - def install(packages) + def install(packages, options = Hash.new) handled_os = OSDependencies.supported_operating_system? if handled_os - shell_script = generate_auto_os_script(packages) - user_shell_script = generate_user_os_script(packages) + shell_script = generate_auto_os_script(packages, options) + user_shell_script = generate_user_os_script(packages, options) end if osdeps_interaction(packages, user_shell_script) Autoproj.message " installing OS packages: #{packages.sort.join(", ")}" if Autoproj.verbose @@ -332,13 +334,32 @@ #Package manger for OpenSuse and Suse (untested) class ZypperManager < ShellScriptManager def initialize super(['zypper'], true, - "zypper -n install '%s'", + "zypper install '%s'", "zypper -n install '%s'") end + + def install(packages) + patterns, packages = packages.partition { |pkg| pkg =~ /^@/ } + patterns = patterns.map { |str| str[1..-1] } + result = false + if !patterns.empty? + result |= super(patterns, + :auto_install_cmd => "zypper --non-interactive install --type pattern '%s'", + :user_install_cmd => "zypper install --type pattern '%s'") + end + if !packages.empty? + result |= super(packages) + end + if result + # Invalidate caching of installed packages, as we just + # installed new packages ! + @installed_packages = nil + end + end end # Package manager interface for systems that use yum class YumManager < ShellScriptManager def initialize @@ -521,11 +542,11 @@ end def install(gems) guess_gem_program - base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install'] + base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install', '--no-format-executable'] if !GemManager.with_doc base_cmdline << '--no-rdoc' << '--no-ri' end if GemManager.with_prerelease @@ -2284,10 +2305,11 @@ debian: - ruby2.0 - ruby2.0-dev - rake - rubygems-integration + opensuse: ruby20-devel default: ignore ruby21: debian: - ruby2.1 - ruby2.1-dev @@ -2298,11 +2320,13 @@ debian,ubuntu: build-essential gentoo: ignore arch,manjarolinux: base-dev fedora: ignore darwin: ignore - opensuse: ignore + opensuse: + - ! '@devel_C_C++' + - gcc-c++ autobuild: gem autoproj: gem git: debian: lenny: git @@ -2436,10 +2460,10 @@ end File.open('env.sh', 'w') do |io| io.write <<-EOSHELL export RUBYOPT=-rubygems -export GEM_PATH=#{gem_path.join(":")} +export GEM_PATH=#{gem_path} export GEM_HOME=#{gem_home} export PATH=$GEM_HOME/bin:$PATH EOSHELL end