autobuild 1.10.0.rc12 → 1.10.0.rc13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/autobuild/configurable.rb +1 -0
- data/lib/autobuild/environment.rb +25 -8
- data/lib/autobuild/import/git.rb +4 -4
- data/lib/autobuild/package.rb +10 -5
- data/lib/autobuild/packages/autotools.rb +0 -1
- data/lib/autobuild/packages/cmake.rb +2 -1
- data/lib/autobuild/packages/orogen.rb +1 -3
- data/lib/autobuild/parallel.rb +3 -3
- data/lib/autobuild/utility.rb +1 -0
- data/lib/autobuild/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62f1f8b5be427ce16c5f90acaa29148f6aec1898
|
|
4
|
+
data.tar.gz: 3b3e04ed491d7640d8cd66c65623ac50de886a1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: acc2cabb0c47592702162a230f039e3b2c7138d51ba8a5baa43e62bcb5c0ec8acdc6027a71a3dbad324d839a728bb0606f334556278b7a2c66bb16fc073a58a0
|
|
7
|
+
data.tar.gz: ef56847f897e5f2ba1df4635d731aef7e0590a87a0ece26fa667bd74d4ccd4315215672306a3e414cbb49a75ef3a2ebcf42f0209a4c759b8cc89cafda27a307c
|
|
@@ -90,8 +90,6 @@ class Environment
|
|
|
90
90
|
# If the value is an array, it is joined using the operating system's
|
|
91
91
|
# path separator (File::PATH_SEPARATOR)
|
|
92
92
|
attr_reader :environment
|
|
93
|
-
attr_reader :source_after
|
|
94
|
-
attr_reader :source_before
|
|
95
93
|
|
|
96
94
|
attr_reader :inherited_variables
|
|
97
95
|
|
|
@@ -115,6 +113,11 @@ def initialize
|
|
|
115
113
|
|
|
116
114
|
@system_env = Hash.new
|
|
117
115
|
@original_env = ORIGINAL_ENV.dup
|
|
116
|
+
|
|
117
|
+
@default_pkgconfig_search_suffixes = nil
|
|
118
|
+
@arch_names = nil
|
|
119
|
+
@target_arch = nil
|
|
120
|
+
@arch_size = nil
|
|
118
121
|
end
|
|
119
122
|
|
|
120
123
|
# Declares that the given environment variable holds a path
|
|
@@ -285,7 +288,7 @@ def push(name, *values)
|
|
|
285
288
|
end
|
|
286
289
|
end
|
|
287
290
|
|
|
288
|
-
# Adds
|
|
291
|
+
# Adds new value(s) at the end of an environment variable
|
|
289
292
|
def add(name, *values)
|
|
290
293
|
values = values.map { |v| expand(v) }
|
|
291
294
|
|
|
@@ -385,6 +388,13 @@ def set_path(name, *paths)
|
|
|
385
388
|
add_path(name, *paths)
|
|
386
389
|
end
|
|
387
390
|
|
|
391
|
+
# Add a path at the end of an environment variable
|
|
392
|
+
#
|
|
393
|
+
# Unlike "normal" variables, entries of path variables that cannot be
|
|
394
|
+
# found on disk are filtered out at usage points (either #resolve_env or
|
|
395
|
+
# at the time of envirnonment export)
|
|
396
|
+
#
|
|
397
|
+
# @see push_path
|
|
388
398
|
def add_path(name, *paths)
|
|
389
399
|
declare_path_variable(name)
|
|
390
400
|
paths = paths.map { |p| expand(p) }
|
|
@@ -409,6 +419,13 @@ def remove_path(name, *paths)
|
|
|
409
419
|
end
|
|
410
420
|
end
|
|
411
421
|
|
|
422
|
+
# Add a path at the beginning of an environment variable
|
|
423
|
+
#
|
|
424
|
+
# Unlike "normal" variables, entries of path variables that cannot be
|
|
425
|
+
# found on disk are filtered out at usage points (either #resolve_env or
|
|
426
|
+
# at the time of envirnonment export)
|
|
427
|
+
#
|
|
428
|
+
# @see push_path
|
|
412
429
|
def push_path(name, *values)
|
|
413
430
|
declare_path_variable(name)
|
|
414
431
|
if current = environment.delete(name)
|
|
@@ -432,6 +449,7 @@ def push_path(name, *values)
|
|
|
432
449
|
def source_before(file = nil)
|
|
433
450
|
if file
|
|
434
451
|
@source_before << file
|
|
452
|
+
else @source_before
|
|
435
453
|
end
|
|
436
454
|
end
|
|
437
455
|
|
|
@@ -447,6 +465,7 @@ def source_before(file = nil)
|
|
|
447
465
|
def source_after(file = nil)
|
|
448
466
|
if file
|
|
449
467
|
@source_after << file
|
|
468
|
+
else @source_after
|
|
450
469
|
end
|
|
451
470
|
end
|
|
452
471
|
|
|
@@ -456,7 +475,7 @@ def source_after(file = nil)
|
|
|
456
475
|
#
|
|
457
476
|
# It also sources the files added by source_file
|
|
458
477
|
def export_env_sh(io)
|
|
459
|
-
|
|
478
|
+
source_before.each do |path|
|
|
460
479
|
io.puts SHELL_SOURCE_SCRIPT % path
|
|
461
480
|
end
|
|
462
481
|
|
|
@@ -487,7 +506,7 @@ def export_env_sh(io)
|
|
|
487
506
|
io.puts SHELL_EXPORT_COMMAND % [var]
|
|
488
507
|
end
|
|
489
508
|
end
|
|
490
|
-
|
|
509
|
+
source_after.each do |path|
|
|
491
510
|
io.puts SHELL_SOURCE_SCRIPT % [path]
|
|
492
511
|
end
|
|
493
512
|
end
|
|
@@ -562,9 +581,7 @@ def target_arch=(archname)
|
|
|
562
581
|
@arch_size, @arch_names = nil
|
|
563
582
|
end
|
|
564
583
|
|
|
565
|
-
|
|
566
|
-
@target_arch
|
|
567
|
-
end
|
|
584
|
+
attr_reader :target_arch
|
|
568
585
|
|
|
569
586
|
def arch_names
|
|
570
587
|
if @arch_names
|
data/lib/autobuild/import/git.rb
CHANGED
|
@@ -357,9 +357,9 @@ def delta_between_tags(package, from_tag, to_tag)
|
|
|
357
357
|
# @return [Hash<String,String>] a mapping from a tag name to its commit
|
|
358
358
|
# ID
|
|
359
359
|
def tags(package, options = Hash.new)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
360
|
+
if !options.fetch(only_local: false)
|
|
361
|
+
run_git_bare(package, 'fetch', '--tags')
|
|
362
|
+
end
|
|
363
363
|
tag_list = run_git_bare(package, 'show-ref', '--tags').map(&:strip)
|
|
364
364
|
tags = Hash.new
|
|
365
365
|
tag_list.each do |entry|
|
|
@@ -736,7 +736,7 @@ def commit_present_in?(package, rev, reference)
|
|
|
736
736
|
merge_base = run_git_bare(package, 'merge-base', commit, reference).first
|
|
737
737
|
merge_base == commit
|
|
738
738
|
|
|
739
|
-
rescue Exception
|
|
739
|
+
rescue Exception
|
|
740
740
|
raise PackageException.new(package, 'import'), "failed to find the merge-base between #{rev} and #{reference}. Are you sure these commits exist ?"
|
|
741
741
|
end
|
|
742
742
|
end
|
data/lib/autobuild/package.rb
CHANGED
|
@@ -118,7 +118,8 @@ def update?
|
|
|
118
118
|
def updated?; !!@updated end
|
|
119
119
|
|
|
120
120
|
def initialize(spec = Hash.new)
|
|
121
|
-
@srcdir = @importdir = @logdir = nil
|
|
121
|
+
@srcdir = @importdir = @logdir = @prefix = nil
|
|
122
|
+
@updated = false
|
|
122
123
|
@update = nil
|
|
123
124
|
@failed = nil
|
|
124
125
|
@dependencies = Array.new
|
|
@@ -244,6 +245,8 @@ def update_environment
|
|
|
244
245
|
|
|
245
246
|
class IncompatibleEnvironment < ConfigException; end
|
|
246
247
|
|
|
248
|
+
# @api private
|
|
249
|
+
#
|
|
247
250
|
# Apply this package's environment to the given {Environment} object
|
|
248
251
|
#
|
|
249
252
|
# It does *not* apply the dependencies' environment. Call
|
|
@@ -255,17 +258,17 @@ class IncompatibleEnvironment < ConfigException; end
|
|
|
255
258
|
# package sets a variable as to avoid unexpected conflicts.
|
|
256
259
|
# @return [Array<EnvOp>] list of environment-modifying operations
|
|
257
260
|
# applied so far
|
|
258
|
-
def apply_env(env, set =
|
|
261
|
+
def apply_env(env, set = Hash.new, ops = Array.new)
|
|
259
262
|
self.env.each do |env_op|
|
|
260
263
|
next if ops.last == env_op
|
|
261
264
|
if env_op.type == :set
|
|
262
265
|
if last = set[env_op.name]
|
|
263
266
|
last_pkg, last_values = *last
|
|
264
267
|
if last_values != env_op.values
|
|
265
|
-
raise IncompatibleEnvironment, "trying to reset #{name} to #{values} which conflicts with #{last_pkg.name} already setting it to #{last_values}"
|
|
268
|
+
raise IncompatibleEnvironment, "trying to reset #{env_op.name} to #{env_op.values} which conflicts with #{last_pkg.name} already setting it to #{last_values}"
|
|
266
269
|
end
|
|
267
270
|
else
|
|
268
|
-
set[name] = [self, values]
|
|
271
|
+
set[env_op.name] = [self, env_op.values]
|
|
269
272
|
end
|
|
270
273
|
end
|
|
271
274
|
env.send(env_op.type, env_op.name, *env_op.values)
|
|
@@ -274,9 +277,11 @@ def apply_env(env, set = Set.new, ops = Array.new)
|
|
|
274
277
|
ops
|
|
275
278
|
end
|
|
276
279
|
|
|
280
|
+
# @api private
|
|
281
|
+
#
|
|
277
282
|
# Updates an {Environment} object with the environment of the package's
|
|
278
283
|
# dependencies
|
|
279
|
-
def resolve_dependency_env(env, set
|
|
284
|
+
def resolve_dependency_env(env, set, ops)
|
|
280
285
|
all_dependencies.each do |pkg_name|
|
|
281
286
|
pkg = Autobuild::Package[pkg_name]
|
|
282
287
|
ops = pkg.apply_env(env, set, ops)
|
|
@@ -167,7 +167,6 @@ def prepare
|
|
|
167
167
|
#
|
|
168
168
|
# If it is not the case, remove it to force reconfiguration
|
|
169
169
|
configureflags.flatten!
|
|
170
|
-
force_reconfigure = false
|
|
171
170
|
if File.exist?(configurestamp)
|
|
172
171
|
output = IO.popen("#{configurestamp} --version").readlines.grep(/with options/).first.chomp
|
|
173
172
|
raise "invalid output of config.status --version" unless output =~ /with options "(.*)"$/
|
|
@@ -31,6 +31,7 @@ def full_reconfigures?
|
|
|
31
31
|
attr_reader :prefix_path
|
|
32
32
|
attr_reader :module_path
|
|
33
33
|
end
|
|
34
|
+
@builddir = nil
|
|
34
35
|
@prefix_path = []
|
|
35
36
|
@module_path = []
|
|
36
37
|
@full_reconfigures = true
|
|
@@ -336,7 +337,7 @@ def prepare
|
|
|
336
337
|
end
|
|
337
338
|
|
|
338
339
|
value = value.to_s
|
|
339
|
-
old_value = cache_line.
|
|
340
|
+
old_value = cache_line.partition("=").last.chomp if cache_line
|
|
340
341
|
if !old_value || !equivalent_option_value?(old_value, value)
|
|
341
342
|
if Autobuild.debug
|
|
342
343
|
message "%s: option '#{name}' changed value: '#{old_value}' => '#{value}'"
|
|
@@ -94,7 +94,7 @@ def self.orogen_root
|
|
|
94
94
|
if @orogen_root
|
|
95
95
|
@orogen_root
|
|
96
96
|
elsif orogen_bin = self.orogen_bin(true)
|
|
97
|
-
@orogen_root = File.expand_path('../lib', File.dirname(
|
|
97
|
+
@orogen_root = File.expand_path('../lib', File.dirname(orogen_bin))
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -248,8 +248,6 @@ def guess_ruby_name
|
|
|
248
248
|
end
|
|
249
249
|
|
|
250
250
|
def add_cmd_to_cmdline(cmd, cmdline)
|
|
251
|
-
base = nil
|
|
252
|
-
|
|
253
251
|
if cmd =~ /^([\w-]+)/
|
|
254
252
|
cmd_filter = $1
|
|
255
253
|
else
|
data/lib/autobuild/parallel.rb
CHANGED
|
@@ -248,10 +248,10 @@ def resolve_cycle(all_tasks, tasks, reverse_dependencies)
|
|
|
248
248
|
Autobuild.fatal "parallel processing stopped prematurely, but no cycle is present in the remaining tasks"
|
|
249
249
|
Autobuild.fatal "remaining tasks: #{cycle.map(&:name).join(", ")}"
|
|
250
250
|
Autobuild.fatal "known dependencies at initialization time that could block the processing of the remaining tasks"
|
|
251
|
-
reverse_dependencies.each do |
|
|
252
|
-
if cycle.include?(
|
|
251
|
+
reverse_dependencies.each do |parent_task, parents|
|
|
252
|
+
if cycle.include?(parent_task)
|
|
253
253
|
parents.each do |p|
|
|
254
|
-
Autobuild.fatal " #{p}: #{
|
|
254
|
+
Autobuild.fatal " #{p}: #{parent_task}"
|
|
255
255
|
end
|
|
256
256
|
end
|
|
257
257
|
end
|
data/lib/autobuild/utility.rb
CHANGED
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autobuild
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.10.0.
|
|
4
|
+
version: 1.10.0.rc13
|
|
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-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|