bin/autoproj in autoproj-1.7.13 vs bin/autoproj in autoproj-1.7.14.rc1
- old
+ new
@@ -50,11 +50,20 @@
# Check the first element of ARGV. If a tool called autoproj-VALUE exists, just
# pass the hand to it
prefix = File.expand_path(__FILE__)
if File.file?("#{prefix}-#{ARGV.first}")
binary = "#{prefix}-#{ARGV.shift}"
- exec(binary, *ARGV)
+ # RubyGems have a BIG performance problem when $LOADED_PATH starts to be
+ # big.
+ #
+ # So, if the sub-script is Ruby-based, just load it and exit
+ if File.readlines(binary).first =~ /ruby/
+ load binary
+ exit
+ else
+ exec(binary, *ARGV)
+ end
end
# Find the autoproj root dir
report do
selected_packages =
@@ -95,9 +104,17 @@
# Basic initialization
Autoproj::CmdLine.initialize
if selected_packages.empty?
Autoproj::CmdLine.update_myself
Autoproj::CmdLine.update_configuration
+ else
+ begin
+ old_value = Autobuild.do_update
+ Autobuild.do_update = false
+ Autoproj::CmdLine.update_configuration
+ ensure
+ Autobuild.do_update = old_value
+ end
end
Autoproj::CmdLine.load_configuration
manifest = Autoproj.manifest
# Once thing left to do: handle the Autoproj.auto_update configuration