Skip to content

Commit

Permalink
Merge pull request #239 from rock-core/fix_package_setup
Browse files Browse the repository at this point in the history
properly finalize package setup when updating with an empty selection
  • Loading branch information
doudou authored Feb 20, 2019
2 parents 6ae7ff7 + 3858b44 commit 8a5558a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/autoproj/cli/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def run(selected_packages, run_hook: false, **options)
command_line_selection, selected_packages =
finish_loading_configuration(selected_packages)
else
ws.setup_all_package_directories
ws.finalize_package_setup
command_line_selection, selected_packages = [], PackageSelection.new
end

Expand Down
7 changes: 7 additions & 0 deletions test/cli/test_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ module CLI
with(hsh(checkout_only: true)).once
cli.run([], checkout_only: true)
end
it "properly sets up packages while updating configuration only" do
flexmock(ws).should_receive(:setup_all_package_directories).
ordered.once
flexmock(ws).should_receive(:finalize_package_setup).
ordered.once
cli.run([], config: true)
end
it "passes options to the osdep installer for package import" do
flexmock(Ops::Import).new_instances.
should_receive(:import_packages).
Expand Down

0 comments on commit 8a5558a

Please sign in to comment.