autoproj 1.8.2.b5 → 1.8.2.b6

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
@@ -1740,34 +1745,56 @@ end
1740
1745
 
1741
1746
  DEFS = <<EODEFS
1742
1747
  ---
1743
- build-essential:
1748
+ git:
1749
+ debian:
1750
+ default: git-core
1751
+ lenny: git
1752
+ arch: git
1753
+ gentoo: dev-vcs/git
1754
+ ubuntu: git-core
1755
+ autotools:
1756
+ debian,ubuntu:
1757
+ - automake1.9
1758
+ - autoconf
1759
+ arch: automake autoconf
1760
+ gentoo:
1761
+ - sys-devel/automake:1.9
1762
+ - sys-devel/autoconf
1763
+ none: ignore
1764
+ cvs:
1765
+ debian,ubuntu: cvs
1766
+ cmake:
1767
+ debian,ubuntu: cmake
1768
+ arch: cmake
1769
+ gentoo: dev-util/cmake
1770
+ lsb_release:
1771
+ debian,ubuntu: lsb-release
1744
1772
  arch: ignore
1745
- gentoo: ignore
1746
- debian,ubuntu: build-essential
1773
+ gentoo: sys-apps/lsb-release
1774
+ zlib:
1775
+ debian,ubuntu: zlib1g-dev
1776
+ autoproj: gem
1747
1777
  ruby19:
1748
- ubuntu:
1778
+ debian:
1749
1779
  - ruby1.9.1
1750
1780
  - ruby1.9.1-dev
1751
1781
  - rubygems1.9.1
1752
- - ri1.9.1
1753
- - libopenssl-ruby1.9.1
1754
1782
  - rake
1783
+ - rubygems-integration
1755
1784
  arch:
1756
1785
  - ruby
1757
1786
  - rake
1758
1787
  gentoo:
1759
1788
  - dev-lang/ruby:1.9
1760
1789
  - rake
1761
- debian:
1790
+ ubuntu:
1762
1791
  - ruby1.9.1
1763
1792
  - ruby1.9.1-dev
1764
1793
  - rubygems1.9.1
1794
+ - ri1.9.1
1795
+ - libopenssl-ruby1.9.1
1765
1796
  - rake
1766
- - rubygems-integration
1767
1797
  ruby18:
1768
- gentoo:
1769
- - dev-lang/ruby:1.8
1770
- - rake
1771
1798
  debian,ubuntu:
1772
1799
  - ruby1.8-dev
1773
1800
  - ruby1.8
@@ -1775,50 +1802,28 @@ ruby18:
1775
1802
  - ri1.8
1776
1803
  - libopenssl-ruby1.8
1777
1804
  - rake
1805
+ gentoo:
1806
+ - dev-lang/ruby:1.8
1807
+ - rake
1808
+ svn:
1809
+ debian,ubuntu: subversion
1810
+ arch: subversion
1811
+ gentoo: dev-util/subversion
1778
1812
  archive:
1813
+ debian,ubuntu:
1814
+ - tar
1815
+ - unzip
1779
1816
  arch:
1780
1817
  - tar
1781
1818
  - unzip
1782
1819
  gentoo:
1783
1820
  - app-arch/tar
1784
1821
  - app-arch/unzip
1785
- debian,ubuntu:
1786
- - tar
1787
- - unzip
1788
- cmake:
1789
- arch: cmake
1790
- gentoo: dev-util/cmake
1791
- debian,ubuntu: cmake
1792
- svn:
1793
- arch: subversion
1794
- gentoo: dev-util/subversion
1795
- debian,ubuntu: subversion
1796
1822
  autobuild: gem
1797
- autotools:
1798
- arch: automake autoconf
1799
- gentoo:
1800
- - sys-devel/automake:1.9
1801
- - sys-devel/autoconf
1802
- debian,ubuntu:
1803
- - automake1.9
1804
- - autoconf
1805
- git:
1806
- ubuntu: git-core
1807
- arch: git
1808
- gentoo: dev-vcs/git
1809
- debian:
1810
- lenny: git
1811
- default: git-core
1812
- none: ignore
1813
- cvs:
1814
- debian,ubuntu: cvs
1815
- lsb_release:
1823
+ build-essential:
1824
+ debian,ubuntu: build-essential
1816
1825
  arch: ignore
1817
- gentoo: sys-apps/lsb-release
1818
- debian,ubuntu: lsb-release
1819
- autoproj: gem
1820
- zlib:
1821
- debian,ubuntu: zlib1g-dev
1826
+ gentoo: ignore
1822
1827
 
1823
1828
  EODEFS
1824
1829
 
@@ -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.b5"
2
+ VERSION = "1.8.2.b6"
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,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1750541319
4
+ hash: 2914478081
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 8
9
9
  - 2
10
10
  - b
11
- - 5
12
- version: 1.8.2.b5
11
+ - 6
12
+ version: 1.8.2.b6
13
13
  platform: ruby
14
14
  authors:
15
15
  - Rock Core Developers
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- hash: 3080299933
30
+ hash: 3474568203
31
31
  segments:
32
32
  - 1
33
33
  - 6
@@ -92,11 +92,11 @@ dependencies:
92
92
  requirements:
93
93
  - - ~>
94
94
  - !ruby/object:Gem::Version
95
- hash: 5
95
+ hash: 7
96
96
  segments:
97
97
  - 3
98
- - 1
99
- version: "3.1"
98
+ - 0
99
+ version: "3.0"
100
100
  type: :development
101
101
  version_requirements: *id005
102
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.