bin/autoproj in autoproj-1.5.2 vs bin/autoproj in autoproj-1.5.3
- old
+ new
@@ -7,10 +7,11 @@
require 'autoproj'
require 'autoproj/autobuild'
require 'open-uri'
require 'autoproj/cmdline'
+require 'pp'
require 'highline'
include Autoproj
InputError = Autoproj::InputError
@@ -93,14 +94,14 @@
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?
- STDERR.puts
all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages)
Autoproj::CmdLine.status(all_enabled_packages)
exit(0)
elsif Autoproj::CmdLine.check?
all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages)
@@ -124,36 +125,38 @@
if Autoproj::CmdLine.update_os_dependencies?
osdeps = manifest.known_os_packages
osdeps.install(Autoproj.build_system_dependencies)
end
- # Now, we actually do the import. Unfortunately, at this stage, we need to
- # import the package and its dependencies ourselves so that we are able to
- # build the list of packages that have actually been selected on the command
- # line.
- all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages)
+ begin
+ # Now, we actually do the import. Unfortunately, at this stage, we need to
+ # import the package and its dependencies ourselves so that we are able to
+ # 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.build? || Autoproj::CmdLine.doc? || Autoproj::CmdLine.update_os_dependencies?
- if all_enabled_packages.empty?
- STDERR.puts color("autoproj: nothing to do", :bold)
- elsif Autoproj::CmdLine.build? || Autoproj::CmdLine.doc?
- Autoproj::CmdLine.build_packages(selected_packages, all_enabled_packages)
- elsif Autoproj::CmdLine.update_os_dependencies?
- manifest.install_os_dependencies(all_enabled_packages)
- end
+ if Autoproj::CmdLine.build? || Autoproj::CmdLine.doc? || Autoproj::CmdLine.update_os_dependencies?
+ if all_enabled_packages.empty?
+ STDERR.puts color("autoproj: nothing to do", :bold)
+ elsif Autoproj::CmdLine.build? || Autoproj::CmdLine.doc?
+ Autoproj::CmdLine.build_packages(selected_packages, all_enabled_packages)
+ elsif Autoproj::CmdLine.update_os_dependencies?
+ manifest.install_os_dependencies(all_enabled_packages)
+ end
- # Now, do some sanity checks on the result
- prefixes = all_enabled_packages.inject(Set.new) do |set, pkg_name|
- set << Autobuild::Package[pkg_name].prefix
- end
- prefixes.each do |prefix|
- libdir = File.join(prefix, "lib")
- if File.directory?(libdir)
- Autoproj.validate_solib_dependencies(libdir)
+ # Now, do some sanity checks on the result
+ prefixes = all_enabled_packages.inject(Set.new) do |set, pkg_name|
+ set << Autobuild::Package[pkg_name].prefix
end
+ prefixes.each do |prefix|
+ libdir = File.join(prefix, "lib")
+ if File.directory?(libdir)
+ Autoproj.validate_solib_dependencies(libdir)
+ end
+ end
end
+ ensure
+ Autoproj.export_env_sh
+ STDERR.puts color("autoproj: updated #{Autoproj.root_dir}/env.sh", :green)
end
-
- Autoproj.export_env_sh
- STDERR.puts color("autoproj: updated #{Autoproj.root_dir}/env.sh", :green)
end