autoproj 2.0.0.rc12 → 2.0.0.rc13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3783d15f79e9891de1d0aad451928d94ba3f5868
4
- data.tar.gz: 8cd5d53de5bc10304e7327de923739c69b2f7311
3
+ metadata.gz: d8151e59a3c0da556606a3a218bd89372b93f238
4
+ data.tar.gz: 50daf836ced22f12c40bd76cb847db3c3affae62
5
5
  SHA512:
6
- metadata.gz: d21fb154c3098bf0455dcf38d0b243907497dfa30039a03d67e219ef8b1f94fc3d79ebc1f2f86ba42228d1c2fad3585b7cbf2e78abb83020a3c9b1be651cc40a
7
- data.tar.gz: 2c729c154c16dccca56ca4eaeed705758302eacb7e6e9b49228bc687ad3579942f8dbbe1e0f01d41b4b4ea470dcc189094270b6632149e892d01f4c413d4319b
6
+ metadata.gz: 69f7fad5bdc6befbe1968aecee7612ef8cc2eabcb8a6a8ff5f80e9327abb17258eabe979ca675d508623a2c7bbf647da58f0232b9a82689ff07864a7c0e2e5a3
7
+ data.tar.gz: ac5d22bfdc874f48b8ed7a66c773b8006dfebac404c00df64edfcc44877043c079b6fd0f30708581bd973aca50f95c4113cd4918daf965423589e23f9e33f77c
@@ -241,7 +241,7 @@ module Autoproj
241
241
 
242
242
  if !result
243
243
  STDERR.puts "FATAL: failed to install bundler in #{dot_autoproj}"
244
- exit 1
244
+ return
245
245
  end
246
246
  File.join(bundler_gem_home, 'bin', 'bundler')
247
247
  end
@@ -255,11 +255,8 @@ module Autoproj
255
255
  clean_path = env_for_child['PATH']
256
256
  STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
257
257
  STDERR.puts "installing it now ..."
258
- result = system(
259
- clean_env.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
260
- Gem.ruby, '-S', 'gem', 'install', 'bundler')
261
-
262
- if !result
258
+ bundler = install_bundler
259
+ if !bundler
263
260
  if ENV['PATH'] != clean_path
264
261
  STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
265
262
  STDERR.puts " - if you are running 'autoproj upgrade', please contact the autoproj author at https://github.com/rock-core/autoproj/issues/new"
@@ -272,7 +269,6 @@ module Autoproj
272
269
  end
273
270
  end
274
271
 
275
- bundler = File.join(bundler_gem_home, 'bin', 'bundler')
276
272
  if File.exist?(bundler)
277
273
  bundler
278
274
  else
@@ -416,7 +412,9 @@ module Autoproj
416
412
  def install
417
413
  if private_bundler?
418
414
  puts "Installing bundler in #{bundler_gem_home}"
419
- bundler = install_bundler
415
+ if !(bundler = install_bundler)
416
+ exit 1
417
+ end
420
418
  elsif bundler = find_bundler
421
419
  puts "Detected bundler at #{bundler}"
422
420
  else
@@ -241,7 +241,7 @@ module Autoproj
241
241
 
242
242
  if !result
243
243
  STDERR.puts "FATAL: failed to install bundler in #{dot_autoproj}"
244
- exit 1
244
+ return
245
245
  end
246
246
  File.join(bundler_gem_home, 'bin', 'bundler')
247
247
  end
@@ -255,11 +255,8 @@ module Autoproj
255
255
  clean_path = env_for_child['PATH']
256
256
  STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
257
257
  STDERR.puts "installing it now ..."
258
- result = system(
259
- clean_env.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
260
- Gem.ruby, '-S', 'gem', 'install', 'bundler')
261
-
262
- if !result
258
+ bundler = install_bundler
259
+ if !bundler
263
260
  if ENV['PATH'] != clean_path
264
261
  STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
265
262
  STDERR.puts " - if you are running 'autoproj upgrade', please contact the autoproj author at https://github.com/rock-core/autoproj/issues/new"
@@ -272,7 +269,6 @@ module Autoproj
272
269
  end
273
270
  end
274
271
 
275
- bundler = File.join(bundler_gem_home, 'bin', 'bundler')
276
272
  if File.exist?(bundler)
277
273
  bundler
278
274
  else
@@ -416,7 +412,9 @@ module Autoproj
416
412
  def install
417
413
  if private_bundler?
418
414
  puts "Installing bundler in #{bundler_gem_home}"
419
- bundler = install_bundler
415
+ if !(bundler = install_bundler)
416
+ exit 1
417
+ end
420
418
  elsif bundler = find_bundler
421
419
  puts "Detected bundler at #{bundler}"
422
420
  else
@@ -81,8 +81,8 @@ def display_source_package(pkg_name, default_packages, revdeps)
81
81
 
82
82
  def display_osdep_package(pkg_name, default_packages, revdeps)
83
83
  puts Autoproj.color("the osdep '#{pkg_name}'", :bold)
84
- ws.os_package_resolver.resolve_os_packages([pkg_name]).each do |manager, packages|
85
- puts " #{manager.names.first}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
84
+ ws.os_package_resolver.resolve_os_packages([pkg_name]).each do |manager_name, packages|
85
+ puts " #{manager_name}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
86
86
  end
87
87
 
88
88
  display_common_information(pkg_name, default_packages, revdeps)
@@ -25,10 +25,6 @@ def validate_options(packages, options)
25
25
  options[:reset] = :force
26
26
  end
27
27
 
28
- if options[:autoproj].nil?
29
- options[:autoproj] = packages.empty?
30
- end
31
-
32
28
  if mainline = options[:mainline]
33
29
  if mainline == 'mainline' || mainline == 'true'
34
30
  options[:mainline] = true
@@ -42,27 +38,45 @@ def run(selected_packages, options)
42
38
  selected_packages, config_selected =
43
39
  normalize_command_line_package_selection(selected_packages)
44
40
 
45
- if options[:config].nil?
46
- options[:config] = selected_packages.empty? || config_selected
47
- end
41
+ # Autoproj and configuration are updated only if (1) it is
42
+ # explicitely selected or (2) nothing is explicitely selected
43
+ update_autoproj =
44
+ (options[:autoproj] || (
45
+ options[:autoproj] != false &&
46
+ selected_packages.empty? &&
47
+ !options[:config] &&
48
+ !options[:checkout_only])
49
+ )
50
+
51
+ update_config =
52
+ (options[:config] || (
53
+ options[:config] != false &&
54
+ selected_packages.empty? &&
55
+ !options[:autoproj]) ||
56
+ config_selected)
57
+
58
+ update_packages =
59
+ options[:all] ||
60
+ !selected_packages.empty? ||
61
+ (!options[:config] && !options[:autoproj])
48
62
 
49
63
  ws.setup
50
64
  parallel = options[:parallel] || ws.config.parallel_import_level
51
65
 
52
66
  ws.autodetect_operating_system(force: true)
53
67
 
54
- if options[:autoproj]
68
+ if update_autoproj
55
69
  ws.update_autoproj
56
70
  end
57
71
 
58
72
  ws.load_package_sets(
59
73
  mainline: options[:mainline],
60
74
  only_local: options[:only_local],
61
- checkout_only: !options[:config] || options[:checkout_only],
75
+ checkout_only: !update_config || options[:checkout_only],
62
76
  reset: options[:reset],
63
77
  ignore_errors: options[:keep_going],
64
78
  retry_count: options[:retry_count])
65
- if selected_packages.empty? && (config_selected || options[:config]) && !options[:all]
79
+ if !update_packages
66
80
  return [], [], true
67
81
  end
68
82
 
@@ -231,7 +231,7 @@ def install_bundler
231
231
 
232
232
  if !result
233
233
  STDERR.puts "FATAL: failed to install bundler in #{dot_autoproj}"
234
- exit 1
234
+ return
235
235
  end
236
236
  File.join(bundler_gem_home, 'bin', 'bundler')
237
237
  end
@@ -245,11 +245,8 @@ def find_bundler
245
245
  clean_path = env_for_child['PATH']
246
246
  STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
247
247
  STDERR.puts "installing it now ..."
248
- result = system(
249
- clean_env.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
250
- Gem.ruby, '-S', 'gem', 'install', 'bundler')
251
-
252
- if !result
248
+ bundler = install_bundler
249
+ if !bundler
253
250
  if ENV['PATH'] != clean_path
254
251
  STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
255
252
  STDERR.puts " - if you are running 'autoproj upgrade', please contact the autoproj author at https://github.com/rock-core/autoproj/issues/new"
@@ -262,7 +259,6 @@ def find_bundler
262
259
  end
263
260
  end
264
261
 
265
- bundler = File.join(bundler_gem_home, 'bin', 'bundler')
266
262
  if File.exist?(bundler)
267
263
  bundler
268
264
  else
@@ -406,7 +402,9 @@ def gem_bindir
406
402
  def install
407
403
  if private_bundler?
408
404
  puts "Installing bundler in #{bundler_gem_home}"
409
- bundler = install_bundler
405
+ if !(bundler = install_bundler)
406
+ exit 1
407
+ end
410
408
  elsif bundler = find_bundler
411
409
  puts "Detected bundler at #{bundler}"
412
410
  else
@@ -481,7 +479,6 @@ def stage2(*vars)
481
479
  require 'autobuild'
482
480
  puts "saving env.sh and .autoproj/env.sh"
483
481
  save_env_sh(*vars)
484
- puts "calling autoproj envsh #{autoproj_options}"
485
482
  if !system(Gem.ruby, autoproj_path, 'envsh', *autoproj_options)
486
483
  exit 1
487
484
  end
@@ -297,6 +297,14 @@ def pristine(packages, options = Hash.new)
297
297
  install(packages, options.merge(install_only: true))
298
298
  packages = os_package_resolver.resolve_os_packages(packages)
299
299
 
300
+ packages = packages.map do |handler_name, list|
301
+ if manager = package_managers[handler_name]
302
+ [package_managers[handler_name], list]
303
+ else
304
+ raise ArgumentError, "no package manager called #{handler_name} found"
305
+ end
306
+ end
307
+
300
308
  _, other_packages =
301
309
  packages.partition { |handler, list| handler == os_package_manager }
302
310
  other_packages.each do |handler, list|
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "2.0.0.rc12"
2
+ VERSION = "2.0.0.rc13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc12
4
+ version: 2.0.0.rc13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild
@@ -287,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
287
  version: 1.3.1
288
288
  requirements: []
289
289
  rubyforge_project:
290
- rubygems_version: 2.2.2
290
+ rubygems_version: 2.2.3
291
291
  signing_key:
292
292
  specification_version: 4
293
293
  summary: Easy installation and management of sets of software packages