diff --git a/lib/autoproj/cli/update.rb b/lib/autoproj/cli/update.rb index 56c839c5..0a6403b5 100644 --- a/lib/autoproj/cli/update.rb +++ b/lib/autoproj/cli/update.rb @@ -130,8 +130,8 @@ def run(selected_packages, run_hook: false, report: true, ask: false, **options) ws.finalize_setup ws.export_installation_manifest - if options[:osdeps] && !osdep_packages.empty? - ws.install_os_repositories + if options[:osdeps] + ws.install_os_repositories unless osdep_packages.empty? ws.install_os_packages(osdep_packages, **osdeps_options) end diff --git a/lib/autoproj/os_package_installer.rb b/lib/autoproj/os_package_installer.rb index 9f0b9ae6..3d4dcef4 100644 --- a/lib/autoproj/os_package_installer.rb +++ b/lib/autoproj/os_package_installer.rb @@ -423,7 +423,7 @@ def resolve_managers_dependencies(partitioned_packages) # Requests the installation of the given set of packages def install( osdep_packages, all: nil, install_only: false, - run_package_managers_without_packages: false, **options + run_package_managers_without_packages: true, **options ) setup_package_managers(**options) partitioned_packages = diff --git a/lib/autoproj/package_managers/bundler_manager.rb b/lib/autoproj/package_managers/bundler_manager.rb index 14b66b35..4df485b3 100644 --- a/lib/autoproj/package_managers/bundler_manager.rb +++ b/lib/autoproj/package_managers/bundler_manager.rb @@ -34,7 +34,7 @@ def self.with_prerelease(*value) # (see Manager#call_while_empty?) def call_while_empty? - !workspace_configuration_gemfiles.empty? + true end # (see Manager#strict?) @@ -550,13 +550,13 @@ def install(gems, filter_uptodate_packages: false, install_only: false) File.read(gemfile_path) != gemfile_contents) if updated Ops.atomic_write(gemfile_path) do |io| - io.puts gemfile_contents + io.write gemfile_contents end end options = [] binstubs_path = File.join(root_dir, "bin") - if updated || !install_only || !File.file?("#{gemfile_path}.lock") + if updated || !File.file?("#{gemfile_path}.lock") self.class.run_bundler_install(ws, gemfile_path, *options, binstubs: binstubs_path) end