autoproj 2.0.0.rc41 → 2.0.0.rc42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d0b20db732502f99f80c293de6b432fa3efb44e
4
- data.tar.gz: 5b94a0795ead67203aa0fb9a75b0c8539d94b88e
3
+ metadata.gz: fa089f772cf7682ac2d74d05851effa2c21e7ffd
4
+ data.tar.gz: 0ad031e321b6ee31932488de6c399990f34ea0c2
5
5
  SHA512:
6
- metadata.gz: e83690a10494761eb928876a783bc0dbe42468cdb46e4a9ff24a70b1d24164fb351adca407bea5cd506fd883c1f950b14a7789915058d79f6c12c5a4f3e04947
7
- data.tar.gz: 79a383acbd91e887bf26912ac9a375f563a4881f125dad49cc2df58c66a762afb02c74ed16bb06d175c5e9c39a55b24396f93a065d06b0ceb4de31373f4f0e74
6
+ metadata.gz: 5a7f64e6988bb2105ede4c7907f98a12cd309442d44cef7a688ecaae1b446c596eea8f7e22b6b5c0ee54c3af2758fd1a7cd338c1457e4487436ff12af9d0daf7
7
+ data.tar.gz: 498d3119d750f2714c8c6572e9ae56a21f8b9ef5c15cb2e7ba452bf12491a727ac7cc2d09bd8422ab1ed1d9560c8c9656858866ee74b9e1d3ae1153a5795f484
@@ -201,16 +201,26 @@ def merge(info)
201
201
 
202
202
  # Warn if the new osdep definition resolves to a different
203
203
  # set of packages than the old one
204
- old_resolved = resolve_package(h).inject(Hash.new) do |osdep_h, (handler, status, list)|
204
+ old_resolved = resolve_package(h, resolve_recursive: false).inject(Hash.new) do |osdep_h, (handler, status, list)|
205
205
  osdep_h[handler] = [status, list.dup]
206
206
  osdep_h
207
207
  end
208
- new_resolved = info.resolve_package(h).inject(Hash.new) do |osdep_h, (handler, status, list)|
208
+ new_resolved = info.resolve_package(h, resolve_recursive: false).inject(Hash.new) do |osdep_h, (handler, status, list)|
209
209
  osdep_h[handler] = [status, list.dup]
210
210
  osdep_h
211
211
  end
212
212
  if old_resolved != new_resolved
213
- Autoproj.warn("osdeps definition for #{h}, previously defined in #{old} overridden by #{new}: resp. #{old_resolved} and #{new_resolved}")
213
+ Autoproj.warn "osdeps definition for #{h}, previously defined in #{old} overridden by #{new}:"
214
+ first = true
215
+ old_resolved.each do |handler, (_, packages)|
216
+ Autoproj.warn " #{first ? 'resp. ' : ' '}#{handler}: #{packages.map(&:to_s).join(", ")}"
217
+ first = false
218
+ end
219
+ first = true
220
+ new_resolved.each do |handler, (_, packages)|
221
+ Autoproj.warn " #{first ? 'and ' : ' '}#{handler}: #{packages.map(&:to_s).join(", ")}"
222
+ first = false
223
+ end
214
224
  end
215
225
  end
216
226
  v2
@@ -458,6 +468,12 @@ def resolve_name(name)
458
468
  path
459
469
  end
460
470
 
471
+ # Null object class that is used to mark recursive resolution when
472
+ # calling {#resolve_package} with resolve_recursive set to false
473
+ class OSDepRecursiveResolver
474
+ def self.to_s; 'osdep' end
475
+ end
476
+
461
477
  # Return the list of packages that should be installed for +name+
462
478
  #
463
479
  # The following two simple return values are possible:
@@ -475,7 +491,7 @@ def resolve_name(name)
475
491
  # and FOUND_NONEXISTENT if the nonexistent keyword is used for this OS
476
492
  # name and version. The package list might be empty even if status ==
477
493
  # FOUND_PACKAGES, for instance if the ignore keyword is used.
478
- def resolve_package(name)
494
+ def resolve_package(name, resolve_recursive: true)
479
495
  if resolve_package_cache.has_key?(name)
480
496
  return resolve_package_cache[name]
481
497
  end
@@ -523,12 +539,16 @@ def resolve_package(name)
523
539
  # Recursive resolutions
524
540
  found, pkg = partition_osdep_entry(name, dep_def, ['osdep'], [], os_names, os_versions)
525
541
  if found
526
- pkg.each do |pkg_name|
527
- resolved = resolve_package(pkg_name)
528
- if !resolved
529
- raise InvalidRecursiveStatement, "osdep #{pkg_name} does not exist. It is referred to by #{name}."
542
+ if resolve_recursive
543
+ pkg.each do |pkg_name|
544
+ resolved = resolve_package(pkg_name)
545
+ if !resolved
546
+ raise InvalidRecursiveStatement, "the '#{name}' osdep refers to another osdep, '#{pkg_name}', which does not seem to exist"
547
+ end
548
+ result.concat(resolved)
530
549
  end
531
- result.concat(resolved)
550
+ else
551
+ result << [OSDepRecursiveResolver, found, pkg]
532
552
  end
533
553
  end
534
554
 
@@ -536,7 +556,11 @@ def resolve_package(name)
536
556
  args.last.freeze
537
557
  end
538
558
  result.freeze
539
- resolve_package_cache[name] = result
559
+ if resolve_recursive
560
+ resolve_package_cache[name] = result
561
+ else
562
+ result
563
+ end
540
564
  end
541
565
 
542
566
  # Value returned by #resolve_package and #partition_osdep_entry in
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "2.0.0.rc41"
2
+ VERSION = "2.0.0.rc42"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc41
4
+ version: 2.0.0.rc42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
@@ -337,3 +337,4 @@ signing_key:
337
337
  specification_version: 4
338
338
  summary: Easy installation and management of sets of software packages
339
339
  test_files: []
340
+ has_rdoc: