autoproj 1.12.2 → 1.12.3
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 +4 -4
- data/lib/autoproj/osdeps.rb +4 -4
- data/lib/autoproj/version.rb +1 -1
- data/test/test_os_dependencies.rb +34 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 637cb2d979fdfc52bf67351191732a630d2fd5c7
|
4
|
+
data.tar.gz: 0848f873ef7eeee121c45d16f5d7d20d8bc84e37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a640bf6335809841f42a268e70fb49e9400c1ff898549b22b73e03c767402b2373240206b7a32075ac83fd667dfaa14039044829b4c486158573f8836403adaa
|
7
|
+
data.tar.gz: 3b219a2cf3ca7baf530452ac46dd1c9bad2fe6d58c8c883cabf05b49bb42bd263c23a6de2f8e85f39c8b3b85e63626404f6a37370bd0c0942011ea5d27916a52
|
data/bin/autoproj_bootstrap
CHANGED
@@ -1506,20 +1506,20 @@ fi
|
|
1506
1506
|
@definitions = definitions.merge(info.definitions) do |h, v1, v2|
|
1507
1507
|
if v1 != v2
|
1508
1508
|
root_dir ||= "#{Autoproj.root_dir}/"
|
1509
|
-
old = source_of(h).gsub(root_dir, '')
|
1510
|
-
new = info.source_of(h).gsub(root_dir, '')
|
1511
1509
|
|
1512
1510
|
# Warn if the new osdep definition resolves to a different
|
1513
1511
|
# set of packages than the old one
|
1514
1512
|
old_resolved = resolve_package(h).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
1515
1513
|
osdep_h[handler.name] = [status, list]
|
1516
|
-
|
1514
|
+
osdep_h
|
1517
1515
|
end
|
1518
1516
|
new_resolved = info.resolve_package(h).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
1519
1517
|
osdep_h[handler.name] = [status, list]
|
1520
|
-
|
1518
|
+
osdep_h
|
1521
1519
|
end
|
1522
1520
|
if old_resolved != new_resolved
|
1521
|
+
old = source_of(h).gsub(root_dir, '')
|
1522
|
+
new = info.source_of(h).gsub(root_dir, '')
|
1523
1523
|
Autoproj.warn("osdeps definition for #{h}, previously defined in #{old} overridden by #{new}")
|
1524
1524
|
end
|
1525
1525
|
end
|
data/lib/autoproj/osdeps.rb
CHANGED
@@ -1043,20 +1043,20 @@ fi
|
|
1043
1043
|
@definitions = definitions.merge(info.definitions) do |h, v1, v2|
|
1044
1044
|
if v1 != v2
|
1045
1045
|
root_dir ||= "#{Autoproj.root_dir}/"
|
1046
|
-
old = source_of(h).gsub(root_dir, '')
|
1047
|
-
new = info.source_of(h).gsub(root_dir, '')
|
1048
1046
|
|
1049
1047
|
# Warn if the new osdep definition resolves to a different
|
1050
1048
|
# set of packages than the old one
|
1051
1049
|
old_resolved = resolve_package(h).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
1052
1050
|
osdep_h[handler.name] = [status, list]
|
1053
|
-
|
1051
|
+
osdep_h
|
1054
1052
|
end
|
1055
1053
|
new_resolved = info.resolve_package(h).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
1056
1054
|
osdep_h[handler.name] = [status, list]
|
1057
|
-
|
1055
|
+
osdep_h
|
1058
1056
|
end
|
1059
1057
|
if old_resolved != new_resolved
|
1058
|
+
old = source_of(h).gsub(root_dir, '')
|
1059
|
+
new = info.source_of(h).gsub(root_dir, '')
|
1060
1060
|
Autoproj.warn("osdeps definition for #{h}, previously defined in #{old} overridden by #{new}")
|
1061
1061
|
end
|
1062
1062
|
end
|
data/lib/autoproj/version.rb
CHANGED
@@ -548,5 +548,39 @@ class TC_OSDependencies < Test::Unit::TestCase
|
|
548
548
|
flexmock(ENV).should_receive('[]').with('PATH').and_return('')
|
549
549
|
assert !Autoproj::OSDependencies.os_from_lsb
|
550
550
|
end
|
551
|
+
|
552
|
+
def test_merge_issues_a_warning_if_two_definitions_differ_by_the_operating_system_packages
|
553
|
+
Autoproj::OSDependencies.operating_system = [['os0'], []]
|
554
|
+
osdeps0 = Autoproj::OSDependencies.new
|
555
|
+
osdeps0.definitions['pkg'] = Hash['os0' => ['osdep0'], 'gem' => ['gem0']]
|
556
|
+
osdeps0.sources['pkg'] = 'bla/bla'
|
557
|
+
osdeps1 = Autoproj::OSDependencies.new
|
558
|
+
osdeps1.definitions['pkg'] = Hash['os0' => ['osdep1'], 'gem' => ['gem0']]
|
559
|
+
osdeps1.sources['pkg'] = 'bla/bla'
|
560
|
+
flexmock(Autoproj).should_receive(:warn).once
|
561
|
+
osdeps0.merge(osdeps1)
|
562
|
+
end
|
563
|
+
def test_merge_issues_a_warning_if_two_definitions_differ_by_an_os_independent_package
|
564
|
+
Autoproj::OSDependencies.operating_system = [['os0'], []]
|
565
|
+
osdeps0 = Autoproj::OSDependencies.new
|
566
|
+
osdeps0.definitions['pkg'] = Hash['os0' => ['osdep0'], 'gem' => ['gem0']]
|
567
|
+
osdeps0.sources['pkg'] = 'bla/bla'
|
568
|
+
osdeps1 = Autoproj::OSDependencies.new
|
569
|
+
osdeps1.definitions['pkg'] = Hash['os0' => ['osdep0'], 'gem' => ['gem1']]
|
570
|
+
osdeps1.sources['pkg'] = 'bla/bla'
|
571
|
+
flexmock(Autoproj).should_receive(:warn).once
|
572
|
+
osdeps0.merge(osdeps1)
|
573
|
+
end
|
574
|
+
def test_merge_does_not_issue_a_warning_if_two_definitions_are_identical_for_the_local_operating_system
|
575
|
+
Autoproj::OSDependencies.operating_system = [['os0'], []]
|
576
|
+
osdeps0 = Autoproj::OSDependencies.new
|
577
|
+
osdeps0.definitions['pkg'] = Hash['os0' => ['osdep0'], 'gem' => ['gem0'], 'os1' => ['osdep0']]
|
578
|
+
osdeps0.sources['pkg'] = 'bla/bla'
|
579
|
+
osdeps1 = Autoproj::OSDependencies.new
|
580
|
+
osdeps1.definitions['pkg'] = Hash['os0' => ['osdep0'], 'gem' => ['gem0'], 'os1' => ['osdep1']]
|
581
|
+
osdeps1.sources['pkg'] = 'bla/bla'
|
582
|
+
flexmock(Autoproj).should_receive(:warn).never
|
583
|
+
osdeps0.merge(osdeps1)
|
584
|
+
end
|
551
585
|
end
|
552
586
|
|