autoproj 2.0.0.rc42 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autoproj/cli/status.rb +4 -4
- data/lib/autoproj/os_package_resolver.rb +38 -27
- 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: 76bc72f60bd12fb8626be1bd3b750deea75f4613
|
4
|
+
data.tar.gz: e69bc9fc35160b4e1c57ead90e4f18424a0ba456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2db69c1d9d67720fcf69b916b023678ba1c50a8484925f1e0722e982d5d71de7f03a8520556779afa86bb5793059f994fc46a0de358698d4f156707e00ae3d96
|
7
|
+
data.tar.gz: 0fe40287446c20df8759ca1d1675ad1e451505d9d5ffbf0d796e43b7b13964287e76331a241667bd23b23be7aa639151c1a26117fc37229bce80ffd6e8dd61ad
|
data/lib/autoproj/cli/status.rb
CHANGED
@@ -68,17 +68,17 @@ def status_of_package(package_description, only_local: false, snapshot: false)
|
|
68
68
|
package_status.msg << Autoproj.color(" is not imported yet", :magenta)
|
69
69
|
else
|
70
70
|
if importer.respond_to?(:snapshot)
|
71
|
-
|
71
|
+
snapshot_version =
|
72
72
|
begin importer.snapshot(pkg, nil, exact_state: false, only_local: only_local)
|
73
73
|
rescue Autobuild::PackageException
|
74
74
|
Hash.new
|
75
75
|
end
|
76
|
-
if snapshot_overrides_vcs?(importer, package_description.vcs,
|
77
|
-
non_nil_values =
|
76
|
+
if snapshot_overrides_vcs?(importer, package_description.vcs, snapshot_version)
|
77
|
+
non_nil_values = snapshot_version.delete_if { |k, v| !v }
|
78
78
|
package_status.msg << Autoproj.color(" found configuration that contains all local changes: #{non_nil_values.sort_by(&:first).map { |k, v| "#{k}: #{v}" }.join(", ")}", :bright_green)
|
79
79
|
package_status.msg << Autoproj.color(" consider adding this to your overrides, or use autoproj versions to do it for you", :bright_green)
|
80
80
|
if snapshot
|
81
|
-
importer.relocate(importer.repository,
|
81
|
+
importer.relocate(importer.repository, snapshot_version)
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
@@ -193,35 +193,10 @@ def invalidate_resolve_package_cache
|
|
193
193
|
# Merges the osdeps information of +info+ into +self+. If packages are
|
194
194
|
# defined in both OSPackageResolver objects, the information in +info+
|
195
195
|
# takes precedence
|
196
|
-
def merge(info)
|
196
|
+
def merge(info, suffixes: [])
|
197
197
|
@definitions = definitions.merge(info.definitions) do |h, v1, v2|
|
198
198
|
if v1 != v2
|
199
|
-
|
200
|
-
new = info.source_of(h)
|
201
|
-
|
202
|
-
# Warn if the new osdep definition resolves to a different
|
203
|
-
# set of packages than the old one
|
204
|
-
old_resolved = resolve_package(h, resolve_recursive: false).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
205
|
-
osdep_h[handler] = [status, list.dup]
|
206
|
-
osdep_h
|
207
|
-
end
|
208
|
-
new_resolved = info.resolve_package(h, resolve_recursive: false).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
209
|
-
osdep_h[handler] = [status, list.dup]
|
210
|
-
osdep_h
|
211
|
-
end
|
212
|
-
if old_resolved != new_resolved
|
213
|
-
Autoproj.warn "osdeps definition for #{h}, previously defined in #{old} overridden by #{new}:"
|
214
|
-
first = true
|
215
|
-
old_resolved.each do |handler, (_, packages)|
|
216
|
-
Autoproj.warn " #{first ? 'resp. ' : ' '}#{handler}: #{packages.map(&:to_s).join(", ")}"
|
217
|
-
first = false
|
218
|
-
end
|
219
|
-
first = true
|
220
|
-
new_resolved.each do |handler, (_, packages)|
|
221
|
-
Autoproj.warn " #{first ? 'and ' : ' '}#{handler}: #{packages.map(&:to_s).join(", ")}"
|
222
|
-
first = false
|
223
|
-
end
|
224
|
-
end
|
199
|
+
warn_about_merge_collisions(info, suffixes, h, v1, v2)
|
225
200
|
end
|
226
201
|
v2
|
227
202
|
end
|
@@ -240,6 +215,42 @@ def merge(info)
|
|
240
215
|
end
|
241
216
|
end
|
242
217
|
|
218
|
+
# @api private
|
219
|
+
#
|
220
|
+
# Warn about a collision (override) detected during #merge
|
221
|
+
def warn_about_merge_collisions(merged_info, suffixes, key, old_value, new_value)
|
222
|
+
old = source_of(key)
|
223
|
+
new = merged_info.source_of(key)
|
224
|
+
|
225
|
+
if suffixes.any? { |s| "#{old}#{s}" == new }
|
226
|
+
return
|
227
|
+
end
|
228
|
+
|
229
|
+
# Warn if the new osdep definition resolves to a different
|
230
|
+
# set of packages than the old one
|
231
|
+
old_resolved = resolve_package(key, resolve_recursive: false).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
232
|
+
osdep_h[handler] = [status, list.dup]
|
233
|
+
osdep_h
|
234
|
+
end
|
235
|
+
new_resolved = merged_info.resolve_package(key, resolve_recursive: false).inject(Hash.new) do |osdep_h, (handler, status, list)|
|
236
|
+
osdep_h[handler] = [status, list.dup]
|
237
|
+
osdep_h
|
238
|
+
end
|
239
|
+
if old_resolved != new_resolved
|
240
|
+
Autoproj.warn "osdeps definition for #{key}, previously defined in #{old} overridden by #{new}:"
|
241
|
+
first = true
|
242
|
+
old_resolved.each do |handler, (_, packages)|
|
243
|
+
Autoproj.warn " #{first ? 'resp. ' : ' '}#{handler}: #{packages.map(&:to_s).join(", ")}"
|
244
|
+
first = false
|
245
|
+
end
|
246
|
+
first = true
|
247
|
+
new_resolved.each do |handler, (_, packages)|
|
248
|
+
Autoproj.warn " #{first ? 'and ' : ' '}#{handler}: #{packages.map(&:to_s).join(", ")}"
|
249
|
+
first = false
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
243
254
|
# Perform some sanity checks on the given osdeps definitions
|
244
255
|
def self.verify_definitions(hash, path = [])
|
245
256
|
hash.each do |key, value|
|
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: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -327,9 +327,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
327
327
|
version: 2.0.0
|
328
328
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
329
329
|
requirements:
|
330
|
-
- - "
|
330
|
+
- - ">="
|
331
331
|
- !ruby/object:Gem::Version
|
332
|
-
version:
|
332
|
+
version: '0'
|
333
333
|
requirements: []
|
334
334
|
rubyforge_project:
|
335
335
|
rubygems_version: 2.5.1
|