autoproj 1.8.2.b8 → 1.8.2.b9

Sign up to get free protection for your applications and to get access to all the features.
@@ -742,7 +742,7 @@ fi
742
742
  else
743
743
  if !@operating_system.nil?
744
744
  return @operating_system
745
- elsif Autoproj.has_config_key?('operating_system')
745
+ elsif Autoproj.has_config_key?('operating_system') && !(user_os = ENV['AUTOPROJ_OS'])
746
746
  os = Autoproj.user_config('operating_system')
747
747
  if os.respond_to?(:to_ary)
748
748
  if os[0].respond_to?(:to_ary) && os[0].all? { |s| s.respond_to?(:to_str) } &&
@@ -1004,6 +1004,9 @@ fi
1004
1004
  found_keys[idx][0] += rec_found
1005
1005
  found_keys[idx][1].concat(rec_result)
1006
1006
  end
1007
+
1008
+ # We only consider the first matching entry
1009
+ keys = nil
1007
1010
  end
1008
1011
  end
1009
1012
  end
@@ -1643,6 +1646,7 @@ module Autoproj
1643
1646
  def self.set_initial_env
1644
1647
  Autoproj.env_set 'RUBYOPT', "-rubygems"
1645
1648
  Autoproj.env_set 'GEM_HOME', Autoproj.gem_home
1649
+ Autoproj.env_add_path 'GEM_PATH', Autoproj.gem_home
1646
1650
  Autoproj.env_set_path 'PATH', "#{Autoproj.gem_home}/bin", "/usr/local/bin", "/usr/bin", "/bin"
1647
1651
  Autoproj.env_set 'PKG_CONFIG_PATH'
1648
1652
  Autoproj.env_set 'RUBYLIB'
@@ -1672,7 +1676,7 @@ module Autoproj
1672
1676
  Autoproj.message
1673
1677
  Autoproj.message "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
1674
1678
  Autoproj.message "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
1675
- Autobuild.env_source_file(shell_file)
1679
+ Autobuild.env_source_after(shell_file)
1676
1680
  end
1677
1681
  end
1678
1682
  end
@@ -1756,6 +1760,7 @@ ruby19:
1756
1760
  - ruby1.9.1-dev
1757
1761
  - rubygems1.9.1
1758
1762
  - rake
1763
+ - rubygems-integration
1759
1764
  ubuntu:
1760
1765
  - ruby1.9.1
1761
1766
  - ruby1.9.1-dev
@@ -1773,14 +1778,6 @@ build-essential:
1773
1778
  debian,ubuntu: build-essential
1774
1779
  gentoo: ignore
1775
1780
  arch: ignore
1776
- libxml2:
1777
- debian,ubuntu: libxml2-dev
1778
- gentoo: dev-libs/libxml2
1779
- arch: libxml2
1780
- libxslt:
1781
- debian,ubuntu: libxslt1-dev
1782
- gentoo: dev-libs/libxslt
1783
- arch: libxslt
1784
1781
  zlib:
1785
1782
  debian,ubuntu: zlib1g-dev
1786
1783
  autobuild: gem
@@ -19,6 +19,7 @@ ruby19:
19
19
  - ruby1.9.1-dev
20
20
  - rubygems1.9.1
21
21
  - rake
22
+ - rubygems-integration
22
23
 
23
24
  ubuntu:
24
25
  - ruby1.9.1
@@ -39,16 +40,6 @@ build-essential:
39
40
  gentoo: ignore
40
41
  arch: ignore
41
42
 
42
- libxml2:
43
- debian,ubuntu: libxml2-dev
44
- gentoo: dev-libs/libxml2
45
- arch: libxml2
46
-
47
- libxslt:
48
- debian,ubuntu: libxslt1-dev
49
- gentoo: dev-libs/libxslt
50
- arch: libxslt
51
-
52
43
  zlib:
53
44
  debian,ubuntu: zlib1g-dev
54
45
 
@@ -125,6 +125,18 @@ module Autoproj
125
125
  Autobuild.env_source_file(file)
126
126
  end
127
127
 
128
+ # Requests that autoproj source the given shell script in its own env.sh
129
+ # script
130
+ def self.env_source_after(file)
131
+ Autobuild.env_source_after(file)
132
+ end
133
+
134
+ # Requests that autoproj source the given shell script in its own env.sh
135
+ # script
136
+ def self.env_source_before(file)
137
+ Autobuild.env_source_before(file)
138
+ end
139
+
128
140
  # Representation of a VCS definition contained in a source.yml file or in
129
141
  # autoproj/manifest
130
142
  class VCSDefinition
@@ -562,7 +574,7 @@ module Autoproj
562
574
  if local?
563
575
  File.expand_path(vcs.url)
564
576
  else
565
- File.expand_path(File.join(Autoproj.remotes_dir, vcs.to_s.gsub(/[^\w]/, '_')))
577
+ File.expand_path(File.join(Autoproj.remotes_dir, vcs.create_autobuild_importer.repository_id.gsub(/[^\w]/, '_')))
566
578
  end
567
579
  end
568
580
 
@@ -1727,7 +1739,11 @@ module Autoproj
1727
1739
  elsif !available_as_source
1728
1740
  raise ConfigError, "cannot resolve #{name}: it is not a package, not a metapackage and not an osdeps"
1729
1741
  end
1730
- return [[:package, name]]
1742
+ if source_packages
1743
+ return source_packages
1744
+ else
1745
+ return [[:package, name]]
1746
+ end
1731
1747
  end
1732
1748
 
1733
1749
  # +name+ can either be the name of a source or the name of a package. In
@@ -643,7 +643,7 @@ fi
643
643
  else
644
644
  if !@operating_system.nil?
645
645
  return @operating_system
646
- elsif Autoproj.has_config_key?('operating_system')
646
+ elsif Autoproj.has_config_key?('operating_system') && !(user_os = ENV['AUTOPROJ_OS'])
647
647
  os = Autoproj.user_config('operating_system')
648
648
  if os.respond_to?(:to_ary)
649
649
  if os[0].respond_to?(:to_ary) && os[0].all? { |s| s.respond_to?(:to_str) } &&
@@ -905,6 +905,9 @@ fi
905
905
  found_keys[idx][0] += rec_found
906
906
  found_keys[idx][1].concat(rec_result)
907
907
  end
908
+
909
+ # We only consider the first matching entry
910
+ keys = nil
908
911
  end
909
912
  end
910
913
  end
@@ -106,6 +106,7 @@ module Autoproj
106
106
  def self.set_initial_env
107
107
  Autoproj.env_set 'RUBYOPT', "-rubygems"
108
108
  Autoproj.env_set 'GEM_HOME', Autoproj.gem_home
109
+ Autoproj.env_add_path 'GEM_PATH', Autoproj.gem_home
109
110
  Autoproj.env_set_path 'PATH', "#{Autoproj.gem_home}/bin", "/usr/local/bin", "/usr/bin", "/bin"
110
111
  Autoproj.env_set 'PKG_CONFIG_PATH'
111
112
  Autoproj.env_set 'RUBYLIB'
@@ -135,7 +136,7 @@ module Autoproj
135
136
  Autoproj.message
136
137
  Autoproj.message "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
137
138
  Autoproj.message "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
138
- Autobuild.env_source_file(shell_file)
139
+ Autobuild.env_source_after(shell_file)
139
140
  end
140
141
  end
141
142
  end
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.8.2.b8"
2
+ VERSION = "1.8.2.b9"
3
3
  end
@@ -107,12 +107,13 @@ class TC_OSDependencies < Test::Unit::TestCase
107
107
  end
108
108
 
109
109
  def test_resolve_specific_os_name_and_version_fallback
110
- data = { 'pkg' => {
111
- 'test' => {
112
- 'v1.1' => 'pkg1.1',
113
- 'default' => 'pkgdef'
114
- }
115
- } }
110
+ data = { 'pkg' =>
111
+ { 'test' =>
112
+ { 'v1.1' => 'pkg1.1',
113
+ 'default' => 'pkgdef'
114
+ }
115
+ }
116
+ }
116
117
  osdeps = create_osdep(data)
117
118
 
118
119
  expected = [[osdeps.os_package_handler, FOUND_PACKAGES, ['pkgdef']]]
@@ -321,6 +322,26 @@ class TC_OSDependencies < Test::Unit::TestCase
321
322
  assert_equal expected, osdeps.resolve_package('pkg')
322
323
  end
323
324
 
325
+ def test_specific_os_version_supersedes_nonspecific_one
326
+ data = { 'pkg' =>
327
+ { 'test' => { 'gem' => 'gempkg' },
328
+ 'debian' => 'binary_package'
329
+ }
330
+ }
331
+ osdeps = create_osdep(data)
332
+ expected = [[osdeps.package_handlers['gem'], FOUND_PACKAGES, ['gempkg']]]
333
+ assert_equal expected, osdeps.resolve_package('pkg')
334
+
335
+ data = { 'pkg' =>
336
+ { 'test' => 'binary_package',
337
+ 'default' => { 'gem' => 'gem_package' }
338
+ }
339
+ }
340
+ osdeps = create_osdep(data)
341
+ expected = [[osdeps.os_package_handler, FOUND_PACKAGES, ['binary_package']]]
342
+ assert_equal expected, osdeps.resolve_package('pkg')
343
+ end
344
+
324
345
  def test_availability_of
325
346
  osdeps = flexmock(OSDependencies.new)
326
347
  osdeps.should_receive(:resolve_package).with('pkg0').once.and_return(
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: 1.8.2.b8
4
+ version: 1.8.2.b9
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild
16
- requirement: &16778020 !ruby/object:Gem::Requirement
16
+ requirement: &7511060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.6.0.rc1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16778020
24
+ version_requirements: *7511060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: utilrb
27
- requirement: &16777080 !ruby/object:Gem::Requirement
27
+ requirement: &7510160 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16777080
35
+ version_requirements: *7510160
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: highline
38
- requirement: &16776500 !ruby/object:Gem::Requirement
38
+ requirement: &7509460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.5.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *16776500
46
+ version_requirements: *7509460
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rdoc
49
- requirement: &16775640 !ruby/object:Gem::Requirement
49
+ requirement: &7508660 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '3.10'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *16775640
57
+ version_requirements: *7508660
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hoe
60
- requirement: &16774300 !ruby/object:Gem::Requirement
60
+ requirement: &7507380 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '3.0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *16774300
68
+ version_requirements: *7507380
69
69
  description: autoproj is a manager for sets of software packages. It allows the user
70
70
  to import and build packages from source, still using the underlying distribution's
71
71
  native package manager for software that is available on it.