autoproj 2.0.0.rc31 → 2.0.0.rc32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/autoproj.gemspec +1 -0
- data/bin/autoproj_bootstrap +122 -99
- data/bin/autoproj_install +122 -99
- data/lib/autoproj.rb +1 -0
- data/lib/autoproj/configuration.rb +42 -30
- data/lib/autoproj/ops/install.rb +122 -99
- data/lib/autoproj/package_managers/bundler_manager.rb +6 -20
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +21 -3
- metadata +16 -2
@@ -37,27 +37,17 @@ def initialize_environment
|
|
37
37
|
config = ws.config
|
38
38
|
|
39
39
|
env.add_path 'PATH', File.join(ws.prefix_dir, 'gems', 'bin')
|
40
|
-
env.add_path 'PATH', File.join(
|
41
|
-
env.add_path 'PATH', File.join(config.gems_gem_home(ws), 'bin')
|
42
|
-
env.add_path 'PATH', File.join(ws.dot_autoproj_dir, 'autoproj', 'bin')
|
40
|
+
env.add_path 'PATH', File.join(ws.dot_autoproj_dir, 'bin')
|
43
41
|
env.set 'GEM_HOME', config.gems_gem_home(ws)
|
44
|
-
env.set 'GEM_PATH', config.
|
42
|
+
env.set 'GEM_PATH', config.autoproj_gem_home
|
45
43
|
|
46
|
-
|
47
|
-
gemfile_path = File.join(root_dir, 'Gemfile')
|
44
|
+
gemfile_path = File.join(ws.prefix_dir, 'gems', 'Gemfile')
|
48
45
|
if File.file?(gemfile_path)
|
49
46
|
env.set('BUNDLE_GEMFILE', gemfile_path)
|
50
47
|
end
|
51
48
|
|
52
|
-
if !config.private_bundler? || !config.private_autoproj? || !config.private_gems?
|
53
|
-
env.set('GEM_PATH', *Gem.default_path)
|
54
|
-
end
|
55
49
|
Autobuild.programs['bundler'] = File.join(ws.dot_autoproj_dir, 'bin', 'bundler')
|
56
50
|
|
57
|
-
if config.private_bundler?
|
58
|
-
env.add_path 'GEM_PATH', config.bundler_gem_home
|
59
|
-
end
|
60
|
-
|
61
51
|
env.init_from_env 'RUBYLIB'
|
62
52
|
env.inherit 'RUBYLIB'
|
63
53
|
# Sanitize the rubylib we get from the environment by removing
|
@@ -88,7 +78,7 @@ def initialize_environment
|
|
88
78
|
gemfile = File.join(prefix_gems, 'Gemfile')
|
89
79
|
if !File.exist?(gemfile)
|
90
80
|
File.open(gemfile, 'w') do |io|
|
91
|
-
io.puts "eval_gemfile \"#{File.join(ws.dot_autoproj_dir, '
|
81
|
+
io.puts "eval_gemfile \"#{File.join(ws.dot_autoproj_dir, 'Gemfile')}\""
|
92
82
|
end
|
93
83
|
end
|
94
84
|
|
@@ -243,7 +233,7 @@ def install(gems, filter_uptodate_packages: false, install_only: false)
|
|
243
233
|
backup_files(backups)
|
244
234
|
if !File.file?("#{gemfile_path}.orig")
|
245
235
|
File.open("#{gemfile_path}.orig", 'w') do |io|
|
246
|
-
io.puts "eval_gemfile \"#{File.join(ws.dot_autoproj_dir, '
|
236
|
+
io.puts "eval_gemfile \"#{File.join(ws.dot_autoproj_dir, 'Gemfile')}\""
|
247
237
|
end
|
248
238
|
end
|
249
239
|
|
@@ -257,7 +247,7 @@ def install(gems, filter_uptodate_packages: false, install_only: false)
|
|
257
247
|
Dir.glob(File.join(ws.overrides_dir, "*.gemfile")) do |gemfile_path|
|
258
248
|
gemfiles << gemfile_path
|
259
249
|
end
|
260
|
-
gemfiles << File.join(ws.dot_autoproj_dir, '
|
250
|
+
gemfiles << File.join(ws.dot_autoproj_dir, 'Gemfile')
|
261
251
|
|
262
252
|
# Save the osdeps entries in a temporary gemfile and finally
|
263
253
|
# merge the whole lot of it
|
@@ -281,10 +271,6 @@ def install(gems, filter_uptodate_packages: false, install_only: false)
|
|
281
271
|
end
|
282
272
|
|
283
273
|
options = Array.new
|
284
|
-
if ws.config.private_gems?
|
285
|
-
options << "--path" << ws.config.gems_bundler_path(ws)
|
286
|
-
end
|
287
|
-
|
288
274
|
binstubs_path = File.join(root_dir, 'bin')
|
289
275
|
if updated || !install_only || !File.file?("#{gemfile_path}.lock")
|
290
276
|
self.class.run_bundler_install ws, gemfile_path, *options,
|
data/lib/autoproj/version.rb
CHANGED
data/lib/autoproj/workspace.rb
CHANGED
@@ -20,6 +20,7 @@ def os_package_resolver; manifest.os_package_resolver end
|
|
20
20
|
|
21
21
|
def initialize(root_dir)
|
22
22
|
@root_dir = root_dir
|
23
|
+
|
23
24
|
@loader = loader
|
24
25
|
@env = Environment.new
|
25
26
|
env.source_before(File.join(dot_autoproj_dir, 'env.sh'))
|
@@ -240,6 +241,7 @@ def setup_os_package_installer
|
|
240
241
|
end
|
241
242
|
|
242
243
|
def setup
|
244
|
+
migrate_bundler_and_autoproj_gem_layout
|
243
245
|
load_config
|
244
246
|
autodetect_operating_system
|
245
247
|
config.validate_ruby_executable
|
@@ -305,13 +307,13 @@ def update_autoproj(restart_on_update: true)
|
|
305
307
|
return
|
306
308
|
end
|
307
309
|
|
308
|
-
gemfile = File.join(dot_autoproj_dir, '
|
309
|
-
binstubs = File.join(dot_autoproj_dir, '
|
310
|
+
gemfile = File.join(dot_autoproj_dir, 'Gemfile')
|
311
|
+
binstubs = File.join(dot_autoproj_dir, 'bin')
|
310
312
|
begin
|
311
313
|
PackageManagers::BundlerManager.run_bundler_install(
|
312
314
|
self, gemfile, binstubs: binstubs)
|
313
315
|
ensure
|
314
|
-
Ops::Install.clean_binstubs(binstubs)
|
316
|
+
Ops::Install.clean_binstubs(binstubs, config.ruby_executable, File.join(config.autoproj_gem_home, 'bin', 'bundler'))
|
315
317
|
end
|
316
318
|
|
317
319
|
# Find out what version of autoproj bundler locked on
|
@@ -350,6 +352,22 @@ def run(*args, &block)
|
|
350
352
|
Autobuild::Subprocess.run(*args, options, &block)
|
351
353
|
end
|
352
354
|
|
355
|
+
def migrate_bundler_and_autoproj_gem_layout
|
356
|
+
if !File.directory?(File.join(dot_autoproj_dir, 'autoproj'))
|
357
|
+
return
|
358
|
+
else
|
359
|
+
config = YAML.load(File.read(File.join(dot_autoproj_dir, 'config.yml')))
|
360
|
+
return if config['autoproj_install_path']
|
361
|
+
end
|
362
|
+
|
363
|
+
Autoproj.silent = false
|
364
|
+
Autoproj.warn "The way bundler and autoproj are installed changed"
|
365
|
+
Autoproj.warn "You must download"
|
366
|
+
Autoproj.warn " https://raw.githubusercontent.com/rock-core/autoproj/master/bin/autoproj_install"
|
367
|
+
Autoproj.warn "and run it at the root of this workspace"
|
368
|
+
exit 2
|
369
|
+
end
|
370
|
+
|
353
371
|
def set_as_main_workspace
|
354
372
|
Autoproj.workspace = self
|
355
373
|
Autoproj.root_dir = root_dir
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.rc32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: autobuild
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|