autoproj 1.8.2.b9 → 1.8.2.b10

Sign up to get free protection for your applications and to get access to all the features.
@@ -951,7 +951,7 @@ fi
951
951
  found = false
952
952
  nonexistent = false
953
953
  result = []
954
- found_keys = []
954
+ found_keys = Hash.new
955
955
  Array(dep_def).each do |names, values|
956
956
  if !values
957
957
  # Raw array of packages. Possible only if we are not at toplevel
@@ -997,20 +997,25 @@ fi
997
997
  matching_name = keys.find { |k| names.any? { |name_tag| k == name_tag.downcase } }
998
998
  if matching_name
999
999
  rec_found, rec_result = partition_osdep_entry(osdep_name, values, handler_names, excluded, *additional_keys)
1000
-
1001
- if rec_found
1002
- idx = keys.index(matching_name)
1000
+ # We only consider the first highest-priority entry,
1001
+ # regardless of whether it has some packages for us or
1002
+ # not
1003
+ idx = keys.index(matching_name)
1004
+ if !rec_found
1005
+ if !found_keys.has_key?(idx)
1006
+ found_keys[idx] = nil
1007
+ end
1008
+ else
1003
1009
  found_keys[idx] ||= [0, []]
1004
1010
  found_keys[idx][0] += rec_found
1005
1011
  found_keys[idx][1].concat(rec_result)
1006
1012
  end
1007
-
1008
- # We only consider the first matching entry
1009
- keys = nil
1010
1013
  end
1011
1014
  end
1012
1015
  end
1013
- if found_keys = found_keys.compact.first
1016
+ first_entry = found_keys.keys.sort.first
1017
+ found_keys = found_keys[first_entry]
1018
+ if found_keys
1014
1019
  if found_keys[0] > 0
1015
1020
  nonexistent = true
1016
1021
  else
@@ -1741,86 +1746,86 @@ module Autoproj
1741
1746
  end
1742
1747
 
1743
1748
  DEFS = <<EODEFS
1744
- ---
1749
+ ---
1750
+ autobuild: gem
1745
1751
  none: ignore
1746
- ruby18:
1747
- debian,ubuntu:
1748
- - ruby1.8-dev
1749
- - ruby1.8
1750
- - rubygems1.8
1751
- - ri1.8
1752
- - libopenssl-ruby1.8
1753
- - rake
1754
- gentoo:
1755
- - dev-lang/ruby:1.8
1752
+ cmake:
1753
+ arch: cmake
1754
+ debian,ubuntu: cmake
1755
+ gentoo: dev-util/cmake
1756
+ lsb_release:
1757
+ arch: ignore
1758
+ debian,ubuntu: lsb-release
1759
+ gentoo: sys-apps/lsb-release
1760
+ autotools:
1761
+ arch: automake autoconf
1762
+ debian,ubuntu:
1763
+ - automake1.9
1764
+ - autoconf
1765
+ gentoo:
1766
+ - sys-devel/automake:1.9
1767
+ - sys-devel/autoconf
1768
+ zlib:
1769
+ debian,ubuntu: zlib1g-dev
1770
+ cvs:
1771
+ debian,ubuntu: cvs
1772
+ git:
1773
+ arch: git
1774
+ ubuntu: git-core
1775
+ gentoo: dev-vcs/git
1776
+ debian:
1777
+ default: git-core
1778
+ lenny: git
1779
+ ruby19:
1780
+ arch:
1781
+ - ruby
1756
1782
  - rake
1757
- ruby19:
1758
- debian:
1783
+ ubuntu:
1759
1784
  - ruby1.9.1
1760
1785
  - ruby1.9.1-dev
1761
1786
  - rubygems1.9.1
1787
+ - ri1.9.1
1788
+ - libopenssl-ruby1.9.1
1762
1789
  - rake
1763
- - rubygems-integration
1764
- ubuntu:
1790
+ gentoo:
1791
+ - dev-lang/ruby:1.9
1792
+ - rake
1793
+ debian:
1765
1794
  - ruby1.9.1
1766
1795
  - ruby1.9.1-dev
1767
1796
  - rubygems1.9.1
1768
- - ri1.9.1
1769
- - libopenssl-ruby1.9.1
1770
1797
  - rake
1771
- gentoo:
1772
- - dev-lang/ruby:1.9
1798
+ - rubygems-integration
1799
+ ruby18:
1800
+ debian,ubuntu:
1801
+ - ruby1.8-dev
1802
+ - ruby1.8
1803
+ - rubygems1.8
1804
+ - ri1.8
1805
+ - libopenssl-ruby1.8
1773
1806
  - rake
1774
- arch:
1775
- - ruby
1807
+ gentoo:
1808
+ - dev-lang/ruby:1.8
1776
1809
  - rake
1777
- build-essential:
1778
- debian,ubuntu: build-essential
1779
- gentoo: ignore
1780
- arch: ignore
1781
- zlib:
1782
- debian,ubuntu: zlib1g-dev
1783
- autobuild: gem
1784
- autoproj: gem
1785
- git:
1786
- debian:
1787
- lenny: git
1788
- default: git-core
1789
- ubuntu: git-core
1790
- gentoo: dev-vcs/git
1791
- arch: git
1792
- svn:
1810
+ svn:
1811
+ arch: subversion
1793
1812
  debian,ubuntu: subversion
1794
1813
  gentoo: dev-util/subversion
1795
- arch: subversion
1796
- cmake:
1797
- debian,ubuntu: cmake
1798
- gentoo: dev-util/cmake
1799
- arch: cmake
1800
- autotools:
1801
- debian,ubuntu:
1802
- - automake1.9
1803
- - autoconf
1804
- gentoo:
1805
- - sys-devel/automake:1.9
1806
- - sys-devel/autoconf
1807
- arch: automake autoconf
1808
- lsb_release:
1809
- debian,ubuntu: lsb-release
1810
- gentoo: sys-apps/lsb-release
1811
- arch: ignore
1812
- archive:
1813
- debian,ubuntu:
1814
+ archive:
1815
+ arch:
1814
1816
  - tar
1815
1817
  - unzip
1816
- gentoo:
1817
- - app-arch/tar
1818
- - app-arch/unzip
1819
- arch:
1818
+ debian,ubuntu:
1820
1819
  - tar
1821
1820
  - unzip
1822
- cvs:
1823
- debian,ubuntu: cvs
1821
+ gentoo:
1822
+ - app-arch/tar
1823
+ - app-arch/unzip
1824
+ autoproj: gem
1825
+ build-essential:
1826
+ arch: ignore
1827
+ debian,ubuntu: build-essential
1828
+ gentoo: ignore
1824
1829
 
1825
1830
  EODEFS
1826
1831
 
@@ -852,7 +852,7 @@ fi
852
852
  found = false
853
853
  nonexistent = false
854
854
  result = []
855
- found_keys = []
855
+ found_keys = Hash.new
856
856
  Array(dep_def).each do |names, values|
857
857
  if !values
858
858
  # Raw array of packages. Possible only if we are not at toplevel
@@ -898,20 +898,25 @@ fi
898
898
  matching_name = keys.find { |k| names.any? { |name_tag| k == name_tag.downcase } }
899
899
  if matching_name
900
900
  rec_found, rec_result = partition_osdep_entry(osdep_name, values, handler_names, excluded, *additional_keys)
901
-
902
- if rec_found
903
- idx = keys.index(matching_name)
901
+ # We only consider the first highest-priority entry,
902
+ # regardless of whether it has some packages for us or
903
+ # not
904
+ idx = keys.index(matching_name)
905
+ if !rec_found
906
+ if !found_keys.has_key?(idx)
907
+ found_keys[idx] = nil
908
+ end
909
+ else
904
910
  found_keys[idx] ||= [0, []]
905
911
  found_keys[idx][0] += rec_found
906
912
  found_keys[idx][1].concat(rec_result)
907
913
  end
908
-
909
- # We only consider the first matching entry
910
- keys = nil
911
914
  end
912
915
  end
913
916
  end
914
- if found_keys = found_keys.compact.first
917
+ first_entry = found_keys.keys.sort.first
918
+ found_keys = found_keys[first_entry]
919
+ if found_keys
915
920
  if found_keys[0] > 0
916
921
  nonexistent = true
917
922
  else
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.8.2.b9"
2
+ VERSION = "1.8.2.b10"
3
3
  end
@@ -25,12 +25,10 @@ class TC_OSDependencies < Test::Unit::TestCase
25
25
  def create_osdep(data)
26
26
  osdeps = OSDependencies.new(data)
27
27
  # Mock the package handlers
28
- osdeps.os_package_handler = flexmock(PackageManagers::Manager.new)
29
- osdeps.os_package_handler.should_receive('names').and_return(['apt-dpkg'])
28
+ osdeps.os_package_handler = flexmock(PackageManagers::Manager.new(['apt-dpkg']))
30
29
  osdeps.package_handlers.clear
31
30
  osdeps.package_handlers['apt-dpkg'] = osdeps.os_package_handler
32
- osdeps.package_handlers['gem'] = flexmock(PackageManagers::Manager.new)
33
- osdeps.package_handlers['gem'].should_receive('names').and_return(['gem'])
31
+ osdeps.package_handlers['gem'] = flexmock(PackageManagers::Manager.new(['gem']))
34
32
  flexmock(osdeps)
35
33
  end
36
34
 
@@ -324,8 +322,9 @@ class TC_OSDependencies < Test::Unit::TestCase
324
322
 
325
323
  def test_specific_os_version_supersedes_nonspecific_one
326
324
  data = { 'pkg' =>
327
- { 'test' => { 'gem' => 'gempkg' },
328
- 'debian' => 'binary_package'
325
+ {
326
+ 'debian' => 'binary_package',
327
+ 'test' => { 'gem' => 'gempkg' }
329
328
  }
330
329
  }
331
330
  osdeps = create_osdep(data)
@@ -333,8 +332,9 @@ class TC_OSDependencies < Test::Unit::TestCase
333
332
  assert_equal expected, osdeps.resolve_package('pkg')
334
333
 
335
334
  data = { 'pkg' =>
336
- { 'test' => 'binary_package',
337
- 'default' => { 'gem' => 'gem_package' }
335
+ {
336
+ 'default' => { 'gem' => 'gem_package' },
337
+ 'test' => 'binary_package'
338
338
  }
339
339
  }
340
340
  osdeps = create_osdep(data)
metadata CHANGED
@@ -1,76 +1,107 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
- version: !ruby/object:Gem::Version
4
- version: 1.8.2.b9
3
+ version: !ruby/object:Gem::Version
4
+ hash: 540536345
5
5
  prerelease: 6
6
+ segments:
7
+ - 1
8
+ - 8
9
+ - 2
10
+ - b
11
+ - 10
12
+ version: 1.8.2.b10
6
13
  platform: ruby
7
- authors:
14
+ authors:
8
15
  - Rock Core Developers
9
16
  autorequire:
10
17
  bindir: bin
11
18
  cert_chain: []
12
- date: 2012-10-04 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
19
+
20
+ date: 2012-10-04 00:00:00 Z
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
15
23
  name: autobuild
16
- requirement: &7511060 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
17
26
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 3998849465
31
+ segments:
32
+ - 1
33
+ - 6
34
+ - 0
35
+ - rc
36
+ - 1
21
37
  version: 1.6.0.rc1
22
38
  type: :runtime
23
- prerelease: false
24
- version_requirements: *7511060
25
- - !ruby/object:Gem::Dependency
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
26
41
  name: utilrb
27
- requirement: &7510160 !ruby/object:Gem::Requirement
42
+ prerelease: false
43
+ requirement: &id002 !ruby/object:Gem::Requirement
28
44
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ hash: 15
49
+ segments:
50
+ - 1
51
+ - 6
52
+ - 0
32
53
  version: 1.6.0
33
54
  type: :runtime
34
- prerelease: false
35
- version_requirements: *7510160
36
- - !ruby/object:Gem::Dependency
55
+ version_requirements: *id002
56
+ - !ruby/object:Gem::Dependency
37
57
  name: highline
38
- requirement: &7509460 !ruby/object:Gem::Requirement
58
+ prerelease: false
59
+ requirement: &id003 !ruby/object:Gem::Requirement
39
60
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 1
67
+ - 5
68
+ - 0
43
69
  version: 1.5.0
44
70
  type: :runtime
45
- prerelease: false
46
- version_requirements: *7509460
47
- - !ruby/object:Gem::Dependency
71
+ version_requirements: *id003
72
+ - !ruby/object:Gem::Dependency
48
73
  name: rdoc
49
- requirement: &7508660 !ruby/object:Gem::Requirement
74
+ prerelease: false
75
+ requirement: &id004 !ruby/object:Gem::Requirement
50
76
  none: false
51
- requirements:
77
+ requirements:
52
78
  - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '3.10'
79
+ - !ruby/object:Gem::Version
80
+ hash: 19
81
+ segments:
82
+ - 3
83
+ - 10
84
+ version: "3.10"
55
85
  type: :development
56
- prerelease: false
57
- version_requirements: *7508660
58
- - !ruby/object:Gem::Dependency
86
+ version_requirements: *id004
87
+ - !ruby/object:Gem::Dependency
59
88
  name: hoe
60
- requirement: &7507380 !ruby/object:Gem::Requirement
89
+ prerelease: false
90
+ requirement: &id005 !ruby/object:Gem::Requirement
61
91
  none: false
62
- requirements:
92
+ requirements:
63
93
  - - ~>
64
- - !ruby/object:Gem::Version
65
- version: '3.0'
94
+ - !ruby/object:Gem::Version
95
+ hash: 7
96
+ segments:
97
+ - 3
98
+ - 0
99
+ version: "3.0"
66
100
  type: :development
67
- prerelease: false
68
- version_requirements: *7507380
69
- description: autoproj is a manager for sets of software packages. It allows the user
70
- to import and build packages from source, still using the underlying distribution's
71
- native package manager for software that is available on it.
101
+ version_requirements: *id005
102
+ description: autoproj is a manager for sets of software packages. It allows the user to import and build packages from source, still using the underlying distribution's native package manager for software that is available on it.
72
103
  email: rock-dev@dfki.de
73
- executables:
104
+ executables:
74
105
  - amake
75
106
  - aup
76
107
  - autolocate
@@ -81,12 +112,13 @@ executables:
81
112
  - autoproj_bootstrap
82
113
  - autoproj_stress_test
83
114
  extensions: []
84
- extra_rdoc_files:
115
+
116
+ extra_rdoc_files:
85
117
  - History.txt
86
118
  - Manifest.txt
87
119
  - README.txt
88
120
  - samples/autoproj/README.txt
89
- files:
121
+ files:
90
122
  - History.txt
91
123
  - Manifest.txt
92
124
  - README.txt
@@ -125,39 +157,49 @@ files:
125
157
  - test/data/test_manifest/autoproj/manifest
126
158
  - test/test_debian.rb
127
159
  - test/test_manifest.rb
128
- - test/test_package_manifest.rb
129
160
  - test/test_os_dependencies.rb
130
161
  - test/package_managers/test_gem.rb
162
+ - test/test_package_manifest.rb
131
163
  - .gemtest
132
164
  homepage: http://rock-robotics.org/documentation/autoproj
133
165
  licenses: []
166
+
134
167
  post_install_message:
135
- rdoc_options:
168
+ rdoc_options:
136
169
  - --main
137
170
  - README.txt
138
- require_paths:
171
+ require_paths:
139
172
  - lib
140
- required_ruby_version: !ruby/object:Gem::Requirement
173
+ required_ruby_version: !ruby/object:Gem::Requirement
141
174
  none: false
142
- requirements:
143
- - - ! '>='
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ hash: 3
179
+ segments:
180
+ - 0
181
+ version: "0"
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
147
183
  none: false
148
- requirements:
149
- - - ! '>'
150
- - !ruby/object:Gem::Version
184
+ requirements:
185
+ - - ">"
186
+ - !ruby/object:Gem::Version
187
+ hash: 25
188
+ segments:
189
+ - 1
190
+ - 3
191
+ - 1
151
192
  version: 1.3.1
152
193
  requirements: []
194
+
153
195
  rubyforge_project: autobuild
154
- rubygems_version: 1.8.11
196
+ rubygems_version: 1.8.24
155
197
  signing_key:
156
198
  specification_version: 3
157
199
  summary: Easy installation and management of sets of software packages
158
- test_files:
159
- - test/test_manifest.rb
160
- - test/test_package_manifest.rb
200
+ test_files:
161
201
  - test/test_os_dependencies.rb
162
- - test/test_debian.rb
163
202
  - test/package_managers/test_gem.rb
203
+ - test/test_manifest.rb
204
+ - test/test_debian.rb
205
+ - test/test_package_manifest.rb