bin/autoproj in autoproj-1.6.2 vs bin/autoproj in autoproj-1.7.0.b1

- old
+ new

@@ -1,7 +1,14 @@ #! /usr/bin/env ruby +if !ARGV.grep("--env").empty? + require 'autoproj/system' + puts File.join(Autoproj.root_dir, "env.sh") + exit +end + + if RUBY_VERSION < "1.8.7" STDERR.puts "autoproj requires Ruby >= 1.8.7" exit 1 end @@ -101,13 +108,17 @@ # to the value of Autoproj.auto_update if Autobuild.do_update.nil? Autobuild.do_update = Autoproj.auto_update? end + selected_packages = Autoproj::CmdLine.resolve_user_selection(selected_packages) + Autoproj.manifest.explicit_selection = selected_packages + Autoproj::CmdLine.initial_package_setup + # If in verbose mode, or if we only update sources, list the sources if Autoproj.verbose || Autoproj::CmdLine.display_configuration? - Autoproj::CmdLine.display_sources(manifest) + Autoproj::CmdLine.display_configuration(manifest, selected_packages) end if Autoproj::CmdLine.bootstrap? STDERR.puts <<EOTEXT @@ -134,14 +145,10 @@ if Autoproj::CmdLine.only_config? exit(0) end - selected_packages = Autoproj::CmdLine.resolve_user_selection(selected_packages) - Autoproj.manifest.explicit_selection = selected_packages - Autoproj::CmdLine.initial_package_setup - if Autoproj::CmdLine.only_status? all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages) Autoproj::CmdLine.status(all_enabled_packages) exit(0) elsif Autoproj::CmdLine.check? @@ -178,10 +185,16 @@ # build the list of packages that have actually been selected on the command # line. all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages) if Autoproj::CmdLine.update_os_dependencies? && !all_enabled_packages.empty? - manifest.install_os_dependencies(all_enabled_packages) + begin + update_mode = Autobuild.do_update + Autobuild.do_update ||= Autoproj::CmdLine.osdeps? + manifest.install_os_dependencies(all_enabled_packages) + ensure + Autobuild.do_update = update_mode + end end if all_enabled_packages.empty? STDERR.puts color("autoproj: nothing to do", :bold) elsif Autoproj::CmdLine.doc?