autoproj 1.13.0.b8 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f250951e26c204e89314f6959db2648261ae3c15
4
- data.tar.gz: 1e7c8987de9f3dcc03e48d6a2c5e2818d7f83691
3
+ metadata.gz: 26fd2b3055fed7ae05cf424070645adff0461145
4
+ data.tar.gz: d3b0a4563a5a33767f57ceae457e46d3296a7cd2
5
5
  SHA512:
6
- metadata.gz: f043202d310d0d90173f039a6db8e128adef5dc3ec258d4dcba382accc96aa03f37dde1ae7fb2c5db440980559c03ca12acbb12fc5a1799248d11495c9a50014
7
- data.tar.gz: 4b6a533dae5d8aaab547f5bc6f38ef8d0291513b095da6ac115c1c93871675baeeab5452416b7db503094b13435eb6204ee6522351fd4204e65b9d6725c7c670
6
+ metadata.gz: 0ff86e87b351d820f46895f3560f5672b02e2fd42106ae89e94f1501d1d249eda8070f67516182cdfcf5cc1c074a141fe60dad3f79932ef456680d4afc1c5b20
7
+ data.tar.gz: 21d74bf9a38419528efa7059d1ca6622f9e278d551f024ec3e2e723a58023fa816602961c79ce1329390c1021dae562b224e56777e3d36e087b3da37f4514ea2
@@ -68,6 +68,18 @@ def vcs_to_array(vcs)
68
68
  end
69
69
  end
70
70
 
71
+ def compute_all_revdeps(pkg_revdeps, revdeps)
72
+ pkg_revdeps = pkg_revdeps.dup
73
+ all_revdeps = Array.new
74
+ while !pkg_revdeps.empty?
75
+ parent_name = pkg_revdeps.shift
76
+ next if all_revdeps.include?(parent_name)
77
+ all_revdeps << parent_name
78
+ pkg_revdeps.concat(revdeps[parent_name].to_a)
79
+ end
80
+ all_revdeps
81
+ end
82
+
71
83
  packages.each do |name|
72
84
  result = Autoproj.manifest.resolve_package_name(name, :filter => false)
73
85
  packages, osdeps = result.partition { |type, name| type == :package }
@@ -129,25 +141,21 @@ packages.each do |name|
129
141
  if !File.directory?(Autobuild::Package[pkg_name].srcdir)
130
142
  puts Autobuild.color(" this package is not checked out yet, the dependency information will probably be incomplete", :magenta)
131
143
  end
132
- all_reverse_dependencies = Set.new
133
- pkg_revdeps = revdeps[pkg_name].dup.to_a
134
- while !pkg_revdeps.empty?
135
- parent_name = pkg_revdeps.shift
136
- next if all_reverse_dependencies.include?(parent_name)
137
- all_reverse_dependencies << parent_name
138
- pkg_revdeps.concat(revdeps[parent_name].to_a)
139
- end
140
- if all_reverse_dependencies.empty?
144
+
145
+ pkg_revdeps = revdeps[pkg_name].to_a
146
+ all_revdeps = compute_all_revdeps(pkg_revdeps, revdeps)
147
+ if pkg_revdeps.empty?
141
148
  puts " no reverse dependencies"
142
149
  else
143
- puts " reverse dependencies: #{all_reverse_dependencies.sort.join(", ")}"
150
+ puts " direct reverse dependencies: #{pkg_revdeps.sort.join(", ")}"
151
+ puts " recursive reverse dependencies: #{all_revdeps.sort.join(", ")}"
144
152
  end
145
153
 
146
154
  selections = Set.new
147
- all_reverse_dependencies = all_reverse_dependencies.to_a.sort
148
- all_reverse_dependencies.each do |parent_name|
149
- if default_packages.include?(parent_name)
150
- selections |= default_packages.selection[parent_name]
155
+ all_revdeps = all_revdeps.to_a.sort
156
+ all_revdeps.each do |revdep_parent_name|
157
+ if default_packages.include?(revdep_parent_name)
158
+ selections |= default_packages.selection[revdep_parent_name]
151
159
  end
152
160
  end
153
161
 
@@ -161,7 +169,8 @@ packages.each do |name|
161
169
 
162
170
  pkg = Autobuild::Package[pkg_name]
163
171
  puts " directly depends on: #{pkg.dependencies.sort.join(", ")}"
164
- puts " OS dependencies: #{pkg.os_packages.sort.join(", ")}"
172
+ puts " optionally depends on: #{pkg.optional_dependencies.sort.join(", ")}"
173
+ puts " dependencies on OS packages: #{pkg.os_packages.sort.join(", ")}"
165
174
  end
166
175
 
167
176
  osdeps.each do |pkg_name|
@@ -169,6 +178,15 @@ packages.each do |name|
169
178
  Autoproj.osdeps.resolve_os_dependencies([pkg_name]).each do |manager, packages|
170
179
  puts " #{manager.names.first}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
171
180
  end
181
+
182
+ pkg_revdeps = revdeps[pkg_name].dup.to_a
183
+ all_revdeps = compute_all_revdeps(pkg_revdeps, revdeps)
184
+ if pkg_revdeps.empty?
185
+ puts " no reverse dependencies"
186
+ else
187
+ puts " direct reverse dependencies: #{pkg_revdeps.sort.join(", ")}"
188
+ puts " recursive reverse dependencies: #{all_revdeps.sort.join(", ")}"
189
+ end
172
190
  end
173
191
  end
174
192
 
@@ -827,12 +827,7 @@ fi
827
827
  packages = packages.uniq
828
828
  result = `brew info --json=v1 '#{packages.join("' '")}'`
829
829
  result = begin
830
- result = JSON.parse(result)
831
- if packages.size == 1
832
- [result]
833
- else
834
- result
835
- end
830
+ JSON.parse(result)
836
831
  rescue JSON::ParserError
837
832
  if result && !result.empty?
838
833
  Autoproj.warn "Error while parsing result of brew info --json=v1"
@@ -3150,11 +3145,13 @@ end
3150
3145
  # version of autoproj. If it is "localdev", expect him to install autoproj and
3151
3146
  # run autoproj bootstrap manually.
3152
3147
  if ARGV.first != "localdev"
3153
- if ARGV.first == "dev" || (ENV['AUTOPROJ_USE_PRERELEASE'] == '1')
3148
+ if ARGV.first == "dev"
3154
3149
  ENV['AUTOPROJ_USE_PRERELEASE'] = '1'
3155
- Autoproj::PackageManagers::GemManager.with_prerelease = true
3156
3150
  ARGV.shift
3157
3151
  end
3152
+
3153
+ Autoproj::PackageManagers::GemManager.with_prerelease =
3154
+ (ENV['AUTOPROJ_USE_PRERELEASE'] == '1')
3158
3155
  begin
3159
3156
  osdeps_management.install(['autobuild'])
3160
3157
  osdeps_management.install(['autoproj'])
@@ -216,11 +216,13 @@ end
216
216
  # version of autoproj. If it is "localdev", expect him to install autoproj and
217
217
  # run autoproj bootstrap manually.
218
218
  if ARGV.first != "localdev"
219
- if ARGV.first == "dev" || (ENV['AUTOPROJ_USE_PRERELEASE'] == '1')
219
+ if ARGV.first == "dev"
220
220
  ENV['AUTOPROJ_USE_PRERELEASE'] = '1'
221
- Autoproj::PackageManagers::GemManager.with_prerelease = true
222
221
  ARGV.shift
223
222
  end
223
+
224
+ Autoproj::PackageManagers::GemManager.with_prerelease =
225
+ (ENV['AUTOPROJ_USE_PRERELEASE'] == '1')
224
226
  begin
225
227
  osdeps_management.install(['autobuild'])
226
228
  osdeps_management.install(['autoproj'])
@@ -687,3 +687,12 @@ def remove_from_default(*names)
687
687
  end
688
688
  end
689
689
 
690
+ def renamed_package(current_name, old_name, options)
691
+ if options[:obsolete] && !Autoproj.manifest.explicitely_selected_in_layout?(old_name)
692
+ import_package old_name
693
+ Autoproj.manifest.add_exclusion old_name, "#{old_name} has been renamed to #{current_name}, you still have the option of using the old name by adding '- #{old_name}' explicitely in the layout in autoproj/manifest, but be warned that the name will stop being usable at all in the near future"
694
+ else
695
+ metapackage old_name, current_name
696
+ end
697
+ end
698
+
@@ -231,6 +231,16 @@ module Autoproj
231
231
  end
232
232
  end
233
233
 
234
+ # Returns true if the given package name has been explicitely added to
235
+ # the layout (not indirectly)
236
+ #
237
+ # @param [String] package_name
238
+ # @return [Boolean]
239
+ def explicitely_selected_in_layout?(package_name)
240
+ package_name = package_name.to_str
241
+ normalized_layout.has_key?(package_name)
242
+ end
243
+
234
244
  # True if the given package should not be built and its dependencies
235
245
  # should be considered as met.
236
246
  #
@@ -239,9 +249,7 @@ module Autoproj
239
249
  def excluded?(package_name)
240
250
  package_name = package_name.to_str
241
251
 
242
- if normalized_layout.has_key?(package_name)
243
- false
244
- elsif excluded_in_manifest?(package_name)
252
+ if excluded_in_manifest?(package_name)
245
253
  true
246
254
  elsif automatic_exclusions.any? { |pkg_name, | pkg_name == package_name }
247
255
  true
@@ -266,7 +274,7 @@ module Autoproj
266
274
  next if source_name && source.name != source_name
267
275
  done_something = true
268
276
 
269
- Dir.glob(File.join(source.local_dir, "*.autobuild")).each do |file|
277
+ Dir.glob(File.join(source.local_dir, "*.autobuild")).sort.each do |file|
270
278
  yield(source, file)
271
279
  end
272
280
  end
@@ -883,13 +891,15 @@ module Autoproj
883
891
  #
884
892
  # Right now, the absence of a manifest makes autoproj only issue a
885
893
  # warning. This will later be changed into an error.
886
- def load_package_manifest(pkg_name)
887
- pkg = packages.values.
888
- find { |pkg| pkg.autobuild.name == pkg_name }
894
+ def load_package_manifest(pkg)
895
+ if pkg.respond_to?(:to_str)
896
+ pkg = packages.values.
897
+ find { |p| p.autobuild.name == pkg }
898
+ end
889
899
  package, package_set, file = pkg.autobuild, pkg.package_set, pkg.file
890
900
 
891
- if !pkg_name
892
- raise ArgumentError, "package #{pkg_name} is not defined"
901
+ if !pkg
902
+ raise ArgumentError, "package #{pkg} is not defined"
893
903
  end
894
904
 
895
905
  manifest_paths =
@@ -1159,6 +1169,12 @@ module Autoproj
1159
1169
  pkg.dependencies.each do |pkg_name|
1160
1170
  result[pkg_name] << pkg.name
1161
1171
  end
1172
+ pkg.optional_dependencies.each do |pkg_name|
1173
+ result[pkg_name] << pkg.name
1174
+ end
1175
+ pkg.os_packages.each do |pkg_name|
1176
+ result[pkg_name] << pkg.name
1177
+ end
1162
1178
  end
1163
1179
  result
1164
1180
  end
@@ -312,12 +312,7 @@ fi
312
312
  packages = packages.uniq
313
313
  result = `brew info --json=v1 '#{packages.join("' '")}'`
314
314
  result = begin
315
- result = JSON.parse(result)
316
- if packages.size == 1
317
- [result]
318
- else
319
- result
320
- end
315
+ JSON.parse(result)
321
316
  rescue JSON::ParserError
322
317
  if result && !result.empty?
323
318
  Autoproj.warn "Error while parsing result of brew info --json=v1"
@@ -115,11 +115,19 @@ module Autoproj
115
115
  return each_dependency(modes, &block)
116
116
  end
117
117
 
118
- def each_maintainer
119
- if !block_given?
120
- return enum_for(:each_maintainer)
118
+ def each_rock_maintainer
119
+ return enum_for(__method__) if !block_given?
120
+ xml.elements.each('package/rock_maintainer') do |maintainer|
121
+ (maintainer.text || "").strip.split(',').each do |str|
122
+ name, email = str.split('/').map(&:strip)
123
+ email = nil if email && email.empty?
124
+ yield(name, email)
125
+ end
121
126
  end
127
+ end
122
128
 
129
+ def each_maintainer
130
+ return enum_for(__method__) if !block_given?
123
131
  xml.elements.each('package/maintainer') do |maintainer|
124
132
  (maintainer.text || "").strip.split(',').each do |str|
125
133
  name, email = str.split('/').map(&:strip)
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.13.0.b8"
2
+ VERSION = "1.13.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0.b8
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rock Core Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild
@@ -241,9 +241,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
241
  version: 1.9.2
242
242
  required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  requirements:
244
- - - ">"
244
+ - - ">="
245
245
  - !ruby/object:Gem::Version
246
- version: 1.3.1
246
+ version: '0'
247
247
  requirements: []
248
248
  rubyforge_project:
249
249
  rubygems_version: 2.2.2