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 +4 -4
- data/lib/autoproj/os_package_resolver.rb +34 -10
- data/lib/autoproj/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa089f772cf7682ac2d74d05851effa2c21e7ffd
|
4
|
+
data.tar.gz: 0ad031e321b6ee31932488de6c399990f34ea0c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/autoproj/version.rb
CHANGED
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.
|
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:
|