autoproj 1.8.2.b11 → 1.8.2.b12

Sign up to get free protection for your applications and to get access to all the features.
@@ -948,6 +948,7 @@ fi
948
948
  #
949
949
  def partition_osdep_entry(osdep_name, dep_def, handler_names, excluded, *keys)
950
950
  keys, *additional_keys = *keys
951
+ keys ||= []
951
952
  found = false
952
953
  nonexistent = false
953
954
  result = []
@@ -979,7 +980,7 @@ fi
979
980
  end
980
981
  result.concat(rec_result)
981
982
  end
982
- elsif keys
983
+ else
983
984
  if names.respond_to?(:to_str) # names could be an array already
984
985
  names = names.split(',')
985
986
  end
@@ -1747,12 +1748,58 @@ end
1747
1748
 
1748
1749
  DEFS = <<EODEFS
1749
1750
  ---
1751
+ zlib:
1752
+ debian,ubuntu: zlib1g-dev
1753
+ git:
1754
+ arch: git
1755
+ ubuntu: git-core
1756
+ debian:
1757
+ default: git-core
1758
+ lenny: git
1759
+ gentoo: dev-vcs/git
1750
1760
  cvs:
1751
1761
  debian,ubuntu: cvs
1762
+ cmake:
1763
+ arch: cmake
1764
+ gentoo: dev-util/cmake
1765
+ debian,ubuntu: cmake
1766
+ build-essential:
1767
+ arch: ignore
1768
+ gentoo: ignore
1769
+ debian,ubuntu: build-essential
1752
1770
  autoproj: gem
1753
- zlib:
1754
- debian,ubuntu: zlib1g-dev
1771
+ autobuild: gem
1772
+ lsb_release:
1773
+ arch: ignore
1774
+ gentoo: sys-apps/lsb-release
1775
+ debian,ubuntu: lsb-release
1776
+ none: ignore
1777
+ svn:
1778
+ arch: subversion
1779
+ gentoo: dev-util/subversion
1780
+ debian,ubuntu: subversion
1781
+ archive:
1782
+ arch:
1783
+ - tar
1784
+ - unzip
1785
+ gentoo:
1786
+ - app-arch/tar
1787
+ - app-arch/unzip
1788
+ debian,ubuntu:
1789
+ - tar
1790
+ - unzip
1791
+ autotools:
1792
+ arch: automake autoconf
1793
+ gentoo:
1794
+ - sys-devel/automake:1.9
1795
+ - sys-devel/autoconf
1796
+ debian,ubuntu:
1797
+ - automake1.9
1798
+ - autoconf
1755
1799
  ruby19:
1800
+ arch:
1801
+ - ruby
1802
+ - rake
1756
1803
  ubuntu:
1757
1804
  - ruby1.9.1
1758
1805
  - ruby1.9.1-dev
@@ -1760,19 +1807,19 @@ ruby19:
1760
1807
  - ri1.9.1
1761
1808
  - libopenssl-ruby1.9.1
1762
1809
  - rake
1763
- arch:
1764
- - ruby
1765
- - rake
1766
- gentoo:
1767
- - dev-lang/ruby:1.9
1768
- - rake
1769
1810
  debian:
1770
1811
  - ruby1.9.1
1771
1812
  - ruby1.9.1-dev
1772
1813
  - rubygems1.9.1
1773
1814
  - rake
1774
1815
  - rubygems-integration
1816
+ gentoo:
1817
+ - dev-lang/ruby:1.9
1818
+ - rake
1775
1819
  ruby18:
1820
+ gentoo:
1821
+ - dev-lang/ruby:1.8
1822
+ - rake
1776
1823
  debian,ubuntu:
1777
1824
  - ruby1.8-dev
1778
1825
  - ruby1.8
@@ -1780,52 +1827,6 @@ ruby18:
1780
1827
  - ri1.8
1781
1828
  - libopenssl-ruby1.8
1782
1829
  - rake
1783
- gentoo:
1784
- - dev-lang/ruby:1.8
1785
- - rake
1786
- archive:
1787
- debian,ubuntu:
1788
- - tar
1789
- - unzip
1790
- arch:
1791
- - tar
1792
- - unzip
1793
- gentoo:
1794
- - app-arch/tar
1795
- - app-arch/unzip
1796
- cmake:
1797
- debian,ubuntu: cmake
1798
- arch: cmake
1799
- gentoo: dev-util/cmake
1800
- build-essential:
1801
- debian,ubuntu: build-essential
1802
- arch: ignore
1803
- gentoo: ignore
1804
- svn:
1805
- debian,ubuntu: subversion
1806
- arch: subversion
1807
- gentoo: dev-util/subversion
1808
- none: ignore
1809
- lsb_release:
1810
- debian,ubuntu: lsb-release
1811
- arch: ignore
1812
- gentoo: sys-apps/lsb-release
1813
- autotools:
1814
- debian,ubuntu:
1815
- - automake1.9
1816
- - autoconf
1817
- arch: automake autoconf
1818
- gentoo:
1819
- - sys-devel/automake:1.9
1820
- - sys-devel/autoconf
1821
- git:
1822
- ubuntu: git-core
1823
- arch: git
1824
- gentoo: dev-vcs/git
1825
- debian:
1826
- default: git-core
1827
- lenny: git
1828
- autobuild: gem
1829
1830
 
1830
1831
  EODEFS
1831
1832
 
@@ -849,6 +849,7 @@ fi
849
849
  #
850
850
  def partition_osdep_entry(osdep_name, dep_def, handler_names, excluded, *keys)
851
851
  keys, *additional_keys = *keys
852
+ keys ||= []
852
853
  found = false
853
854
  nonexistent = false
854
855
  result = []
@@ -880,7 +881,7 @@ fi
880
881
  end
881
882
  result.concat(rec_result)
882
883
  end
883
- elsif keys
884
+ else
884
885
  if names.respond_to?(:to_str) # names could be an array already
885
886
  names = names.split(',')
886
887
  end
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.8.2.b11"
2
+ VERSION = "1.8.2.b12"
3
3
  end
@@ -342,6 +342,20 @@ class TC_OSDependencies < Test::Unit::TestCase
342
342
  assert_equal expected, osdeps.resolve_package('pkg')
343
343
  end
344
344
 
345
+ def test_resolve_mixed_os_and_osindep_dependencies
346
+ data = { 'pkg' =>
347
+ { 'test' => { 'default' => ['ospkg', 'gem' => 'gempkg'] }
348
+ }
349
+ }
350
+
351
+ osdeps = create_osdep(data)
352
+ expected = [
353
+ [osdeps.os_package_handler, FOUND_PACKAGES, ['ospkg']],
354
+ [osdeps.package_handlers['gem'], FOUND_PACKAGES, ['gempkg']]
355
+ ].to_set
356
+ assert_equal expected, osdeps.resolve_package('pkg').to_set
357
+ end
358
+
345
359
  def test_availability_of
346
360
  osdeps = flexmock(OSDependencies.new)
347
361
  osdeps.should_receive(:resolve_package).with('pkg0').once.and_return(
@@ -426,7 +440,7 @@ class TC_OSDependencies < Test::Unit::TestCase
426
440
  osdeps.should_receive(:resolve_package).with('pkg0').once.and_return(nil)
427
441
  osdeps.should_receive(:resolve_package).with('pkg1').never
428
442
  osdeps.should_receive(:resolve_package).with('pkg2').never
429
- assert_raises(ConfigError) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
443
+ assert_raises(Autoproj::OSDependencies::MissingOSDep) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
430
444
 
431
445
  osdeps.should_receive(:resolve_package).with('pkg0').once.and_return(
432
446
  [[osdeps.os_package_handler, FOUND_PACKAGES, ['pkg0']]])
@@ -437,13 +451,13 @@ class TC_OSDependencies < Test::Unit::TestCase
437
451
  expected =
438
452
  [[osdeps.os_package_handler, ['pkg0']],
439
453
  [osdeps.package_handlers['gem'], ['gempkg1', 'gempkg2']]]
440
- assert_raises(ConfigError) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
454
+ assert_raises(Autoproj::OSDependencies::MissingOSDep) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
441
455
 
442
456
  osdeps.should_receive(:resolve_package).with('pkg0').once.and_return(
443
457
  [[osdeps.os_package_handler, FOUND_NONEXISTENT, ['pkg0']]])
444
458
  osdeps.should_receive(:resolve_package).with('pkg1').never
445
459
  osdeps.should_receive(:resolve_package).with('pkg2').never
446
- assert_raises(ConfigError) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
460
+ assert_raises(Autoproj::OSDependencies::MissingOSDep) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
447
461
 
448
462
  osdeps.should_receive(:resolve_package).with('pkg0').once.and_return(
449
463
  [[osdeps.os_package_handler, FOUND_PACKAGES, ['pkg0']]])
@@ -451,7 +465,7 @@ class TC_OSDependencies < Test::Unit::TestCase
451
465
  [[osdeps.os_package_handler, FOUND_PACKAGES, ['pkg1']],
452
466
  [osdeps.package_handlers['gem'], FOUND_NONEXISTENT, ['gempkg1']]])
453
467
  osdeps.should_receive(:resolve_package).with('pkg2').never
454
- assert_raises(ConfigError) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
468
+ assert_raises(Autoproj::OSDependencies::MissingOSDep) { osdeps.resolve_os_dependencies(['pkg0', 'pkg1', 'pkg2']) }
455
469
  end
456
470
 
457
471
  def test_install
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: 1097016347
4
+ hash: 126413845
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 8
9
9
  - 2
10
10
  - b
11
- - 11
12
- version: 1.8.2.b11
11
+ - 12
12
+ version: 1.8.2.b12
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: -3362145234
30
+ hash: 3197745649
31
31
  segments:
32
32
  - 1
33
33
  - 6