autoproj 1.9.3.rc2 → 1.9.3.rc3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/autoproj CHANGED
@@ -130,20 +130,12 @@ EOTEXT
130
130
  #
131
131
  # First do the resolution to get auto-add, finalize the package
132
132
  # configuration, and then re-resolve
133
- begin
134
- Autoproj::CmdLine.resolve_user_selection(selected_packages)
135
- rescue Autoproj::Manifest::ExcludedSelection => e
136
- raise e, "#{e.selection}, which is selected on the command line, cannot be built: #{e.message}"
137
- end
133
+ Autoproj::CmdLine.resolve_user_selection(selected_packages)
138
134
  # Now load the rest of the configuration
139
135
  Autoproj::CmdLine.finalize_package_setup
140
136
  # Finally, filter out exclusions
141
137
  resolved_selected_packages =
142
- begin
143
- Autoproj::CmdLine.resolve_user_selection(selected_packages)
144
- rescue Autoproj::Manifest::ExcludedSelection => e
145
- raise e, "#{e.selection}, which is selected on the command line, cannot be built: #{e.message}"
146
- end
138
+ Autoproj::CmdLine.resolve_user_selection(selected_packages)
147
139
  Autoproj::CmdLine.validate_user_selection(selected_packages, resolved_selected_packages)
148
140
 
149
141
  if !selected_packages.empty?
@@ -521,9 +521,20 @@ fi
521
521
  if !installed.empty? && Autobuild.do_update
522
522
  # Look if we can update the package ...
523
523
  dep = Gem::Dependency.new(name, version_requirements)
524
- available = gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
524
+ available =
525
+ if gem_fetcher.respond_to?(:find_matching)
526
+ gem_fetcher.find_matching(dep).map(&:first)
527
+ else # Post RubyGems-2.0
528
+ type = if GemManager.with_prerelease then :prerelease
529
+ else :complete
530
+ end
531
+
532
+ gem_fetcher.detect(type) do |tuple|
533
+ tuple.name == name && dep.match?(tuple)
534
+ end.map { |tuple, _| [tuple.name, tuple.version] }
535
+ end
525
536
  installed_version = installed.map(&:version).max
526
- available_version = available.map { |(name, v), source| v }.max
537
+ available_version = available.map { |name, v| v }.max
527
538
  if !available_version
528
539
  if version
529
540
  raise ConfigError.new, "cannot find any gem with the name '#{name}' and version #{version}"
@@ -642,9 +653,7 @@ fi
642
653
  end
643
654
 
644
655
  def self.ruby_version_keyword
645
- if RUBY_VERSION < "1.9.0" then "ruby18"
646
- else "ruby19"
647
- end
656
+ "ruby#{RUBY_VERSION.split('.')[0, 2].join("")}"
648
657
  end
649
658
 
650
659
  def self.autodetect_ruby
@@ -961,6 +970,8 @@ fi
961
970
  end
962
971
 
963
972
  os_names, os_versions = OSDependencies.operating_system
973
+ os_names = os_names.dup
974
+ os_names << 'default'
964
975
 
965
976
  dep_def = definitions[name]
966
977
  if !dep_def
@@ -1972,6 +1983,7 @@ ruby19:
1972
1983
  - ruby19
1973
1984
  - rake
1974
1985
  default: nonexistent
1986
+ ruby20: ignore
1975
1987
  build-essential:
1976
1988
  debian,ubuntu: build-essential
1977
1989
  gentoo: ignore
@@ -74,7 +74,7 @@ module Autoproj
74
74
  end
75
75
  FileUtils.chmod 0755, File.join(bindir, 'ruby')
76
76
 
77
- subprograms = ['gem', 'irb'].each do |name|
77
+ subprograms = ['gem', 'irb', 'testrb'].each do |name|
78
78
  # Look for the corresponding gem program
79
79
  prg_name = "#{name}#{install_suffix}"
80
80
  if File.file?(prg_path = File.join(ruby_bindir, prg_name))
@@ -82,6 +82,7 @@ module Autoproj
82
82
  io.puts "#! /bin/sh"
83
83
  io.puts "exec #{prg_path} \"$@\""
84
84
  end
85
+ FileUtils.chmod 0755, File.join(bindir, name)
85
86
  end
86
87
  end
87
88
  end
@@ -650,7 +651,7 @@ module Autoproj
650
651
  if chain.size == 1
651
652
  Autoproj.manifest.add_exclusion(pkg_name, "its dependency #{reason}")
652
653
  else
653
- Autoproj.manifest.add_exclusion(pkg_name, "#{reason} (dependency chain: #{chain.join(">")}")
654
+ Autoproj.manifest.add_exclusion(pkg_name, "#{reason} (dependency chain: #{chain.join(">")})")
654
655
  end
655
656
  end
656
657
 
@@ -51,6 +51,8 @@ ruby19:
51
51
  - rake
52
52
  default: nonexistent
53
53
 
54
+ ruby20: ignore
55
+
54
56
  build-essential:
55
57
  debian,ubuntu: build-essential
56
58
  gentoo: ignore
@@ -2222,19 +2222,20 @@ module Autoproj
2222
2222
  exclusions = excluded.map do |pkg_name|
2223
2223
  [pkg_name, manifest.exclusion_reason(pkg_name)]
2224
2224
  end
2225
+ base_msg = "#{sel} is selected in the manifest or on the command line"
2225
2226
  if exclusions.size == 1
2226
2227
  reason = exclusions[0][1]
2227
2228
  if sel == exclusions[0][0]
2228
- raise ExcludedSelection.new(sel), "it is excluded from the build: #{reason}"
2229
+ raise ExcludedSelection.new(sel), "#{base_msg}, but it is excluded from the build: #{reason}"
2229
2230
  elsif weak_dependencies[sel]
2230
- raise ExcludedSelection.new(sel), "it expands to #{exclusions.map(&:first).join(", ")}, which is excluded from the build: #{reason}"
2231
+ raise ExcludedSelection.new(sel), "#{base_msg}, but it expands to #{exclusions.map(&:first).join(", ")}, which is excluded from the build: #{reason}"
2231
2232
  else
2232
- raise ExcludedSelection.new(sel), "it requires #{exclusions.map(&:first).join(", ")}, which is excluded from the build: #{reason}"
2233
+ raise ExcludedSelection.new(sel), "#{base_msg}, but its dependency #{exclusions.map(&:first).join(", ")} is excluded from the build: #{reason}"
2233
2234
  end
2234
2235
  elsif weak_dependencies[sel]
2235
- raise ExcludedSelection.new(sel), "it expands to #{exclusions.map(&:first).join(", ")}, and all these packages are excluded from the build:\n #{exclusions.map { |name, reason| "#{name}: #{reason}" }.join("\n ")}"
2236
+ raise ExcludedSelection.new(sel), "#{base_msg}, but expands to #{exclusions.map(&:first).join(", ")}, and all these packages are excluded from the build:\n #{exclusions.map { |name, reason| "#{name}: #{reason}" }.join("\n ")}"
2236
2237
  else
2237
- raise ExcludedSelection.new(sel), "it requires #{exclusions.map(&:first).join(", ")}, and all these packages are excluded from the build:\n #{exclusions.map { |name, reason| "#{name}: #{reason}" }.join("\n ")}"
2238
+ raise ExcludedSelection.new(sel), "#{base_msg}, but it requires #{exclusions.map(&:first).join(", ")}, and all these packages are excluded from the build:\n #{exclusions.map { |name, reason| "#{name}: #{reason}" }.join("\n ")}"
2238
2239
  end
2239
2240
  else
2240
2241
  self.exclusions[sel] |= excluded.to_set.dup
@@ -404,9 +404,20 @@ fi
404
404
  if !installed.empty? && Autobuild.do_update
405
405
  # Look if we can update the package ...
406
406
  dep = Gem::Dependency.new(name, version_requirements)
407
- available = gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
407
+ available =
408
+ if gem_fetcher.respond_to?(:find_matching)
409
+ gem_fetcher.find_matching(dep).map(&:first)
410
+ else # Post RubyGems-2.0
411
+ type = if GemManager.with_prerelease then :prerelease
412
+ else :complete
413
+ end
414
+
415
+ gem_fetcher.detect(type) do |tuple|
416
+ tuple.name == name && dep.match?(tuple)
417
+ end.map { |tuple, _| [tuple.name, tuple.version] }
418
+ end
408
419
  installed_version = installed.map(&:version).max
409
- available_version = available.map { |(name, v), source| v }.max
420
+ available_version = available.map { |name, v| v }.max
410
421
  if !available_version
411
422
  if version
412
423
  raise ConfigError.new, "cannot find any gem with the name '#{name}' and version #{version}"
@@ -525,9 +536,7 @@ fi
525
536
  end
526
537
 
527
538
  def self.ruby_version_keyword
528
- if RUBY_VERSION < "1.9.0" then "ruby18"
529
- else "ruby19"
530
- end
539
+ "ruby#{RUBY_VERSION.split('.')[0, 2].join("")}"
531
540
  end
532
541
 
533
542
  def self.autodetect_ruby
@@ -844,6 +853,8 @@ fi
844
853
  end
845
854
 
846
855
  os_names, os_versions = OSDependencies.operating_system
856
+ os_names = os_names.dup
857
+ os_names << 'default'
847
858
 
848
859
  dep_def = definitions[name]
849
860
  if !dep_def
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.3.rc2"
2
+ VERSION = "1.9.3.rc3"
3
3
  end
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.9.3.rc2
4
+ version: 1.9.3.rc3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-28 00:00:00.000000000 Z
12
+ date: 2013-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &4807160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 1.7.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 1.7.0
24
+ version_requirements: *4807160
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: utilrb
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &4805920 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 1.6.0
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: 1.6.0
35
+ version_requirements: *4805920
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: highline
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &4804340 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: 1.5.0
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: 1.5.0
46
+ version_requirements: *4804340
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: rdoc
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &4803240 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ~>
@@ -69,28 +54,18 @@ dependencies:
69
54
  version: '3.10'
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: '3.10'
57
+ version_requirements: *4803240
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: hoe
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &4820260 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ~>
84
64
  - !ruby/object:Gem::Version
85
- version: '3.4'
65
+ version: '3.5'
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: '3.4'
68
+ version_requirements: *4820260
94
69
  description: autoproj is a manager for sets of software packages. It allows the user
95
70
  to import and build packages from source, still using the underlying distribution's
96
71
  native package manager for software that is available on it.
@@ -197,14 +172,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
172
  version: 1.3.1
198
173
  requirements: []
199
174
  rubyforge_project: autobuild
200
- rubygems_version: 1.8.23
175
+ rubygems_version: 1.8.11
201
176
  signing_key:
202
177
  specification_version: 3
203
178
  summary: Easy installation and management of sets of software packages
204
179
  test_files:
180
+ - test/test_manifest.rb
181
+ - test/test_package_manifest.rb
205
182
  - test/test_os_dependencies.rb
206
183
  - test/test_debian.rb
207
- - test/test_manifest.rb
208
184
  - test/package_managers/test_apt_dpkg_manager.rb
209
185
  - test/package_managers/test_gem.rb
210
- - test/test_package_manifest.rb