Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/autoproj_bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ module Autoproj
contents = <<~BUNDLERSHIM
#!#{Gem.ruby}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand Down Expand Up @@ -573,6 +574,7 @@ module Autoproj
# Autoproj generated preamble
#{WITHOUT_BUNDLER}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand All @@ -585,6 +587,7 @@ Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']

#{WITHOUT_BUNDLER}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand All @@ -610,6 +613,7 @@ load Gem.bin_path('bundler', 'bundler')"
# Autoproj generated preamble, v1
#{RUBYLIB_REINIT}
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] = '#{autoproj_gemfile_path}.lock'
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
AUTOPROJ_PREAMBLE
Expand All @@ -622,6 +626,7 @@ Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']

#{RUBYLIB_REINIT}
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] = '#{autoproj_gemfile_path}.lock'
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
require 'rubygems'
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand Down
5 changes: 5 additions & 0 deletions bin/autoproj_install
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ module Autoproj
contents = <<~BUNDLERSHIM
#!#{Gem.ruby}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand Down Expand Up @@ -573,6 +574,7 @@ module Autoproj
# Autoproj generated preamble
#{WITHOUT_BUNDLER}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand All @@ -585,6 +587,7 @@ Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']

#{WITHOUT_BUNDLER}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand All @@ -610,6 +613,7 @@ load Gem.bin_path('bundler', 'bundler')"
# Autoproj generated preamble, v1
#{RUBYLIB_REINIT}
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] = '#{autoproj_gemfile_path}.lock'
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
AUTOPROJ_PREAMBLE
Expand All @@ -622,6 +626,7 @@ Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']

#{RUBYLIB_REINIT}
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] = '#{autoproj_gemfile_path}.lock'
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
require 'rubygems'
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand Down
5 changes: 5 additions & 0 deletions lib/autoproj/ops/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ def write_bundle_shim(bundle_shim_path)
contents = <<~BUNDLERSHIM
#!#{Gem.ruby}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand Down Expand Up @@ -563,6 +564,7 @@ def self.shim_bundler(script_lines, ruby_executable, autoproj_gemfile_path, gems
# Autoproj generated preamble
#{WITHOUT_BUNDLER}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand All @@ -575,6 +577,7 @@ def self.shim_bundler_old(ruby_executable, autoproj_gemfile_path, gems_gem_home)

#{WITHOUT_BUNDLER}
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] ||= '#{autoproj_gemfile_path}.lock'
ENV['GEM_HOME'] = '#{gems_gem_home}'
ENV.delete('GEM_PATH')
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand All @@ -600,6 +603,7 @@ def self.shim_script(script_lines, ruby_executable, root_dir,
# Autoproj generated preamble, v1
#{RUBYLIB_REINIT}
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] = '#{autoproj_gemfile_path}.lock'
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
AUTOPROJ_PREAMBLE
Expand All @@ -612,6 +616,7 @@ def self.shim_script_old(ruby_executable, root_dir, autoproj_gemfile_path,

#{RUBYLIB_REINIT}
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
ENV['BUNDLE_LOCKFILE'] = '#{autoproj_gemfile_path}.lock'
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
require 'rubygems'
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
Expand Down
5 changes: 5 additions & 0 deletions lib/autoproj/package_managers/bundler_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def initialize_environment
gemfile_path = File.join(ws.prefix_dir, "gems", "Gemfile")
env.set("BUNDLE_GEMFILE", gemfile_path) if File.file?(gemfile_path)

gemfile_lock_path = "#{gemfile_path}.lock"
if File.file?(gemfile_lock_path)
env.set("BUNDLE_LOCKFILE", gemfile_lock_path)
end

if cache_dir && File.exist?(cache_dir)
vendor_dir = File.join(File.dirname(gemfile_path), "vendor")
FileUtils.mkdir_p vendor_dir
Expand Down