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 +4 -4
- data/bin/autoproj-show +33 -15
- data/bin/autoproj_bootstrap +5 -8
- data/bin/autoproj_bootstrap.in +4 -2
- data/lib/autoproj/autobuild.rb +9 -0
- data/lib/autoproj/manifest.rb +25 -9
- data/lib/autoproj/osdeps.rb +1 -6
- data/lib/autoproj/package_manifest.rb +11 -3
- data/lib/autoproj/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26fd2b3055fed7ae05cf424070645adff0461145
|
4
|
+
data.tar.gz: d3b0a4563a5a33767f57ceae457e46d3296a7cd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ff86e87b351d820f46895f3560f5672b02e2fd42106ae89e94f1501d1d249eda8070f67516182cdfcf5cc1c074a141fe60dad3f79932ef456680d4afc1c5b20
|
7
|
+
data.tar.gz: 21d74bf9a38419528efa7059d1ca6622f9e278d551f024ec3e2e723a58023fa816602961c79ce1329390c1021dae562b224e56777e3d36e087b3da37f4514ea2
|
data/bin/autoproj-show
CHANGED
@@ -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
|
-
|
133
|
-
pkg_revdeps = revdeps[pkg_name].
|
134
|
-
|
135
|
-
|
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: #{
|
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
|
-
|
148
|
-
|
149
|
-
if default_packages.include?(
|
150
|
-
selections |= default_packages.selection[
|
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 "
|
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
|
|
data/bin/autoproj_bootstrap
CHANGED
@@ -827,12 +827,7 @@ fi
|
|
827
827
|
packages = packages.uniq
|
828
828
|
result = `brew info --json=v1 '#{packages.join("' '")}'`
|
829
829
|
result = begin
|
830
|
-
|
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"
|
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'])
|
data/bin/autoproj_bootstrap.in
CHANGED
@@ -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"
|
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'])
|
data/lib/autoproj/autobuild.rb
CHANGED
@@ -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
|
+
|
data/lib/autoproj/manifest.rb
CHANGED
@@ -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
|
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(
|
887
|
-
pkg
|
888
|
-
|
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 !
|
892
|
-
raise ArgumentError, "package #{
|
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
|
data/lib/autoproj/osdeps.rb
CHANGED
@@ -312,12 +312,7 @@ fi
|
|
312
312
|
packages = packages.uniq
|
313
313
|
result = `brew info --json=v1 '#{packages.join("' '")}'`
|
314
314
|
result = begin
|
315
|
-
|
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
|
119
|
-
if !block_given?
|
120
|
-
|
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)
|
data/lib/autoproj/version.rb
CHANGED
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
|
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-
|
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:
|
246
|
+
version: '0'
|
247
247
|
requirements: []
|
248
248
|
rubyforge_project:
|
249
249
|
rubygems_version: 2.2.2
|