autoproj 2.8.6 → 2.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/autoproj_bootstrap +22 -15
- data/bin/autoproj_install +22 -15
- data/lib/autoproj/ops/install.rb +22 -15
- data/lib/autoproj/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz: '
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06899cc513fc1e9db2ad848a7fbb41072c7e98da4edfcee416945795bf6b8073'
|
4
|
+
data.tar.gz: 529ed7ee3173ba42d7ba283c20aa22ae1dd4dd8fdb86e98372766f2f78236c14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fff56785550539d5f0192e648dd7e04714d123eb12c91517066e78f24ee31d11f1a294bed999ade50c76b8126cfefb3e1918588ecc0736c90b6091cd681fb7a
|
7
|
+
data.tar.gz: 9ad7d2cf7f0101009276449bd8c33d274e29e6ee537455864cc2b369b621df7c0343b4a8dc9a2dabd92344c32286b852284a18475afc52d84534e5afcc90270e
|
data/bin/autoproj_bootstrap
CHANGED
@@ -50,12 +50,11 @@ module Autoproj
|
|
50
50
|
@env = Hash.new
|
51
51
|
env['RUBYOPT'] = []
|
52
52
|
env['RUBYLIB'] = []
|
53
|
-
env['GEM_PATH'] = []
|
54
|
-
env['GEM_HOME'] = []
|
55
53
|
env['PATH'] = self.class.sanitize_env(ENV['PATH'] || "")
|
56
54
|
env['BUNDLE_GEMFILE'] = []
|
57
55
|
|
58
56
|
load_config
|
57
|
+
|
59
58
|
if config['ruby_executable'] != Gem.ruby
|
60
59
|
raise "this autoproj installation was already bootstrapped using "\
|
61
60
|
"#{config['ruby_executable']}, but you are currently running "\
|
@@ -65,10 +64,14 @@ module Autoproj
|
|
65
64
|
@ruby_executable = config['ruby_executable']
|
66
65
|
@local = false
|
67
66
|
|
68
|
-
|
67
|
+
unless @gems_install_path
|
68
|
+
install_gems_in_gem_user_dir
|
69
|
+
end
|
70
|
+
env['GEM_HOME'] = [gems_gem_home]
|
71
|
+
env['GEM_PATH'] = [gems_gem_home]
|
69
72
|
end
|
70
73
|
|
71
|
-
def env_for_child
|
74
|
+
def env_for_child(env = self.env)
|
72
75
|
env.inject(Hash.new) do |h, (k, v)|
|
73
76
|
h[k] = if v && !v.empty? then v.join(File::PATH_SEPARATOR)
|
74
77
|
end
|
@@ -288,14 +291,14 @@ module Autoproj
|
|
288
291
|
end
|
289
292
|
|
290
293
|
def find_bundler(gem_program)
|
291
|
-
|
292
|
-
env_for_child,
|
293
|
-
|
294
|
-
|
295
|
-
return
|
294
|
+
setup_path =
|
295
|
+
IO.popen([env_for_child, Gem.ruby, gem_program, 'which', 'bundler/setup']) do |io|
|
296
|
+
io.read
|
297
|
+
end
|
298
|
+
return unless $?.success?
|
296
299
|
|
297
300
|
bundler_path = File.join(gems_gem_home, 'bin', 'bundle')
|
298
|
-
if File.exist?(bundler_path)
|
301
|
+
if File.exist?(bundler_path) && setup_path.start_with?(gems_gem_home)
|
299
302
|
bundler_path
|
300
303
|
end
|
301
304
|
end
|
@@ -308,25 +311,28 @@ module Autoproj
|
|
308
311
|
redirection = Hash[out: :close]
|
309
312
|
end
|
310
313
|
|
314
|
+
# Shut up the bundler warning about 'bin' not being in PATH
|
315
|
+
env = self.env
|
316
|
+
env['PATH'] += [File.join(gems_gem_home, 'bin')]
|
311
317
|
result = system(
|
312
|
-
env_for_child
|
318
|
+
env_for_child(env),
|
313
319
|
Gem.ruby, gem_program, 'install',
|
314
320
|
'--env-shebang', '--no-document', '--no-format-executable',
|
315
321
|
'--clear-sources', '--source', gem_source,
|
322
|
+
'--no-user-install', '--install-dir', gems_gem_home,
|
316
323
|
*local, "--bindir=#{File.join(gems_gem_home, 'bin')}",
|
317
|
-
'
|
324
|
+
'bundler', **redirection)
|
318
325
|
|
319
326
|
if !result
|
320
327
|
STDERR.puts "FATAL: failed to install bundler in #{gems_gem_home}"
|
321
328
|
nil
|
322
329
|
end
|
323
330
|
|
324
|
-
bundler_path =
|
325
|
-
if File.exist?(bundler_path)
|
331
|
+
if (bundler_path = find_bundler(gem_program))
|
326
332
|
bundler_path
|
327
333
|
else
|
328
334
|
STDERR.puts "gem install bundler returned successfully, but still "\
|
329
|
-
"cannot find bundler in #{
|
335
|
+
"cannot find bundler in #{gems_gem_home}"
|
330
336
|
nil
|
331
337
|
end
|
332
338
|
end
|
@@ -603,6 +609,7 @@ require 'bundler/setup'
|
|
603
609
|
gem_program = self.class.guess_gem_program
|
604
610
|
puts "Detected 'gem' to be #{gem_program}"
|
605
611
|
env['GEM_HOME'] = [gems_gem_home]
|
612
|
+
env['GEM_PATH'] = [gems_gem_home]
|
606
613
|
|
607
614
|
if bundler = find_bundler(gem_program)
|
608
615
|
puts "Detected bundler at #{bundler}"
|
data/bin/autoproj_install
CHANGED
@@ -50,12 +50,11 @@ module Autoproj
|
|
50
50
|
@env = Hash.new
|
51
51
|
env['RUBYOPT'] = []
|
52
52
|
env['RUBYLIB'] = []
|
53
|
-
env['GEM_PATH'] = []
|
54
|
-
env['GEM_HOME'] = []
|
55
53
|
env['PATH'] = self.class.sanitize_env(ENV['PATH'] || "")
|
56
54
|
env['BUNDLE_GEMFILE'] = []
|
57
55
|
|
58
56
|
load_config
|
57
|
+
|
59
58
|
if config['ruby_executable'] != Gem.ruby
|
60
59
|
raise "this autoproj installation was already bootstrapped using "\
|
61
60
|
"#{config['ruby_executable']}, but you are currently running "\
|
@@ -65,10 +64,14 @@ module Autoproj
|
|
65
64
|
@ruby_executable = config['ruby_executable']
|
66
65
|
@local = false
|
67
66
|
|
68
|
-
|
67
|
+
unless @gems_install_path
|
68
|
+
install_gems_in_gem_user_dir
|
69
|
+
end
|
70
|
+
env['GEM_HOME'] = [gems_gem_home]
|
71
|
+
env['GEM_PATH'] = [gems_gem_home]
|
69
72
|
end
|
70
73
|
|
71
|
-
def env_for_child
|
74
|
+
def env_for_child(env = self.env)
|
72
75
|
env.inject(Hash.new) do |h, (k, v)|
|
73
76
|
h[k] = if v && !v.empty? then v.join(File::PATH_SEPARATOR)
|
74
77
|
end
|
@@ -288,14 +291,14 @@ module Autoproj
|
|
288
291
|
end
|
289
292
|
|
290
293
|
def find_bundler(gem_program)
|
291
|
-
|
292
|
-
env_for_child,
|
293
|
-
|
294
|
-
|
295
|
-
return
|
294
|
+
setup_path =
|
295
|
+
IO.popen([env_for_child, Gem.ruby, gem_program, 'which', 'bundler/setup']) do |io|
|
296
|
+
io.read
|
297
|
+
end
|
298
|
+
return unless $?.success?
|
296
299
|
|
297
300
|
bundler_path = File.join(gems_gem_home, 'bin', 'bundle')
|
298
|
-
if File.exist?(bundler_path)
|
301
|
+
if File.exist?(bundler_path) && setup_path.start_with?(gems_gem_home)
|
299
302
|
bundler_path
|
300
303
|
end
|
301
304
|
end
|
@@ -308,25 +311,28 @@ module Autoproj
|
|
308
311
|
redirection = Hash[out: :close]
|
309
312
|
end
|
310
313
|
|
314
|
+
# Shut up the bundler warning about 'bin' not being in PATH
|
315
|
+
env = self.env
|
316
|
+
env['PATH'] += [File.join(gems_gem_home, 'bin')]
|
311
317
|
result = system(
|
312
|
-
env_for_child
|
318
|
+
env_for_child(env),
|
313
319
|
Gem.ruby, gem_program, 'install',
|
314
320
|
'--env-shebang', '--no-document', '--no-format-executable',
|
315
321
|
'--clear-sources', '--source', gem_source,
|
322
|
+
'--no-user-install', '--install-dir', gems_gem_home,
|
316
323
|
*local, "--bindir=#{File.join(gems_gem_home, 'bin')}",
|
317
|
-
'
|
324
|
+
'bundler', **redirection)
|
318
325
|
|
319
326
|
if !result
|
320
327
|
STDERR.puts "FATAL: failed to install bundler in #{gems_gem_home}"
|
321
328
|
nil
|
322
329
|
end
|
323
330
|
|
324
|
-
bundler_path =
|
325
|
-
if File.exist?(bundler_path)
|
331
|
+
if (bundler_path = find_bundler(gem_program))
|
326
332
|
bundler_path
|
327
333
|
else
|
328
334
|
STDERR.puts "gem install bundler returned successfully, but still "\
|
329
|
-
"cannot find bundler in #{
|
335
|
+
"cannot find bundler in #{gems_gem_home}"
|
330
336
|
nil
|
331
337
|
end
|
332
338
|
end
|
@@ -603,6 +609,7 @@ require 'bundler/setup'
|
|
603
609
|
gem_program = self.class.guess_gem_program
|
604
610
|
puts "Detected 'gem' to be #{gem_program}"
|
605
611
|
env['GEM_HOME'] = [gems_gem_home]
|
612
|
+
env['GEM_PATH'] = [gems_gem_home]
|
606
613
|
|
607
614
|
if bundler = find_bundler(gem_program)
|
608
615
|
puts "Detected bundler at #{bundler}"
|
data/lib/autoproj/ops/install.rb
CHANGED
@@ -40,12 +40,11 @@ def initialize(root_dir)
|
|
40
40
|
@env = Hash.new
|
41
41
|
env['RUBYOPT'] = []
|
42
42
|
env['RUBYLIB'] = []
|
43
|
-
env['GEM_PATH'] = []
|
44
|
-
env['GEM_HOME'] = []
|
45
43
|
env['PATH'] = self.class.sanitize_env(ENV['PATH'] || "")
|
46
44
|
env['BUNDLE_GEMFILE'] = []
|
47
45
|
|
48
46
|
load_config
|
47
|
+
|
49
48
|
if config['ruby_executable'] != Gem.ruby
|
50
49
|
raise "this autoproj installation was already bootstrapped using "\
|
51
50
|
"#{config['ruby_executable']}, but you are currently running "\
|
@@ -55,10 +54,14 @@ def initialize(root_dir)
|
|
55
54
|
@ruby_executable = config['ruby_executable']
|
56
55
|
@local = false
|
57
56
|
|
58
|
-
|
57
|
+
unless @gems_install_path
|
58
|
+
install_gems_in_gem_user_dir
|
59
|
+
end
|
60
|
+
env['GEM_HOME'] = [gems_gem_home]
|
61
|
+
env['GEM_PATH'] = [gems_gem_home]
|
59
62
|
end
|
60
63
|
|
61
|
-
def env_for_child
|
64
|
+
def env_for_child(env = self.env)
|
62
65
|
env.inject(Hash.new) do |h, (k, v)|
|
63
66
|
h[k] = if v && !v.empty? then v.join(File::PATH_SEPARATOR)
|
64
67
|
end
|
@@ -278,14 +281,14 @@ def parse_options(args = ARGV)
|
|
278
281
|
end
|
279
282
|
|
280
283
|
def find_bundler(gem_program)
|
281
|
-
|
282
|
-
env_for_child,
|
283
|
-
|
284
|
-
|
285
|
-
return
|
284
|
+
setup_path =
|
285
|
+
IO.popen([env_for_child, Gem.ruby, gem_program, 'which', 'bundler/setup']) do |io|
|
286
|
+
io.read
|
287
|
+
end
|
288
|
+
return unless $?.success?
|
286
289
|
|
287
290
|
bundler_path = File.join(gems_gem_home, 'bin', 'bundle')
|
288
|
-
if File.exist?(bundler_path)
|
291
|
+
if File.exist?(bundler_path) && setup_path.start_with?(gems_gem_home)
|
289
292
|
bundler_path
|
290
293
|
end
|
291
294
|
end
|
@@ -298,25 +301,28 @@ def install_bundler(gem_program, silent: false)
|
|
298
301
|
redirection = Hash[out: :close]
|
299
302
|
end
|
300
303
|
|
304
|
+
# Shut up the bundler warning about 'bin' not being in PATH
|
305
|
+
env = self.env
|
306
|
+
env['PATH'] += [File.join(gems_gem_home, 'bin')]
|
301
307
|
result = system(
|
302
|
-
env_for_child
|
308
|
+
env_for_child(env),
|
303
309
|
Gem.ruby, gem_program, 'install',
|
304
310
|
'--env-shebang', '--no-document', '--no-format-executable',
|
305
311
|
'--clear-sources', '--source', gem_source,
|
312
|
+
'--no-user-install', '--install-dir', gems_gem_home,
|
306
313
|
*local, "--bindir=#{File.join(gems_gem_home, 'bin')}",
|
307
|
-
'
|
314
|
+
'bundler', **redirection)
|
308
315
|
|
309
316
|
if !result
|
310
317
|
STDERR.puts "FATAL: failed to install bundler in #{gems_gem_home}"
|
311
318
|
nil
|
312
319
|
end
|
313
320
|
|
314
|
-
bundler_path =
|
315
|
-
if File.exist?(bundler_path)
|
321
|
+
if (bundler_path = find_bundler(gem_program))
|
316
322
|
bundler_path
|
317
323
|
else
|
318
324
|
STDERR.puts "gem install bundler returned successfully, but still "\
|
319
|
-
"cannot find bundler in #{
|
325
|
+
"cannot find bundler in #{gems_gem_home}"
|
320
326
|
nil
|
321
327
|
end
|
322
328
|
end
|
@@ -593,6 +599,7 @@ def install
|
|
593
599
|
gem_program = self.class.guess_gem_program
|
594
600
|
puts "Detected 'gem' to be #{gem_program}"
|
595
601
|
env['GEM_HOME'] = [gems_gem_home]
|
602
|
+
env['GEM_PATH'] = [gems_gem_home]
|
596
603
|
|
597
604
|
if bundler = find_bundler(gem_program)
|
598
605
|
puts "Detected bundler at #{bundler}"
|
data/lib/autoproj/version.rb
CHANGED