autoproj 2.10.1 → 2.13.0
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/.rubocop.yml +5 -8
- data/.travis.yml +5 -3
- data/autoproj.gemspec +7 -6
- data/bin/alog +1 -0
- data/bin/autoproj +1 -1
- data/bin/autoproj_bootstrap +149 -86
- data/bin/autoproj_bootstrap.in +9 -7
- data/bin/autoproj_install +148 -82
- data/bin/autoproj_install.in +8 -3
- data/lib/autoproj.rb +3 -0
- data/lib/autoproj/aruba_minitest.rb +15 -0
- data/lib/autoproj/autobuild_extensions/dsl.rb +61 -27
- data/lib/autoproj/base.rb +35 -6
- data/lib/autoproj/cli/base.rb +1 -1
- data/lib/autoproj/cli/build.rb +9 -3
- data/lib/autoproj/cli/cache.rb +79 -7
- data/lib/autoproj/cli/doc.rb +4 -18
- data/lib/autoproj/cli/inspection_tool.rb +5 -6
- data/lib/autoproj/cli/main.rb +41 -18
- data/lib/autoproj/cli/main_doc.rb +86 -0
- data/lib/autoproj/cli/main_plugin.rb +3 -0
- data/lib/autoproj/cli/main_test.rb +15 -0
- data/lib/autoproj/cli/show.rb +12 -18
- data/lib/autoproj/cli/status.rb +15 -9
- data/lib/autoproj/cli/test.rb +13 -84
- data/lib/autoproj/cli/update.rb +77 -19
- data/lib/autoproj/cli/utility.rb +136 -0
- data/lib/autoproj/configuration.rb +28 -4
- data/lib/autoproj/default.osdeps +18 -0
- data/lib/autoproj/installation_manifest.rb +7 -5
- data/lib/autoproj/manifest.rb +15 -21
- data/lib/autoproj/ops/build.rb +23 -27
- data/lib/autoproj/ops/cache.rb +151 -33
- data/lib/autoproj/ops/cached_env.rb +2 -2
- data/lib/autoproj/ops/import.rb +146 -80
- data/lib/autoproj/ops/install.rb +140 -79
- data/lib/autoproj/ops/phase_reporting.rb +49 -0
- data/lib/autoproj/ops/snapshot.rb +2 -1
- data/lib/autoproj/ops/tools.rb +2 -2
- data/lib/autoproj/os_package_installer.rb +19 -11
- data/lib/autoproj/package_definition.rb +29 -10
- data/lib/autoproj/package_managers/apt_dpkg_manager.rb +49 -28
- data/lib/autoproj/package_managers/bundler_manager.rb +257 -87
- data/lib/autoproj/package_managers/homebrew_manager.rb +2 -2
- data/lib/autoproj/package_managers/shell_script_manager.rb +44 -24
- data/lib/autoproj/package_manifest.rb +49 -34
- data/lib/autoproj/package_set.rb +48 -29
- data/lib/autoproj/repository_managers/apt.rb +0 -1
- data/lib/autoproj/test.rb +29 -10
- data/lib/autoproj/variable_expansion.rb +3 -1
- data/lib/autoproj/vcs_definition.rb +30 -15
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +55 -13
- metadata +32 -28
data/lib/autoproj/ops/install.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'pathname'
|
2
4
|
require 'optparse'
|
3
5
|
require 'fileutils'
|
4
6
|
require 'yaml'
|
7
|
+
require 'English'
|
5
8
|
|
6
9
|
module Autoproj
|
7
10
|
module Ops
|
@@ -13,6 +16,36 @@ module Ops
|
|
13
16
|
class Install
|
14
17
|
class UnexpectedBinstub < RuntimeError; end
|
15
18
|
|
19
|
+
RUBYLIB_REINIT = <<~RUBY
|
20
|
+
if defined?(Bundler)
|
21
|
+
if Bundler.respond_to?(:with_unbundled_env)
|
22
|
+
Bundler.with_unbundled_env do
|
23
|
+
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
Bundler.with_clean_env do
|
27
|
+
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
elsif ENV['RUBYLIB']
|
31
|
+
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
32
|
+
end
|
33
|
+
RUBY
|
34
|
+
|
35
|
+
WITHOUT_BUNDLER = <<~RUBY
|
36
|
+
if defined?(Bundler)
|
37
|
+
if Bundler.respond_to?(:with_unbundled_env)
|
38
|
+
Bundler.with_unbundled_env do
|
39
|
+
exec($0, *ARGV)
|
40
|
+
end
|
41
|
+
else
|
42
|
+
Bundler.with_clean_env do
|
43
|
+
exec($0, *ARGV)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
RUBY
|
48
|
+
|
16
49
|
# The created workspace's root directory
|
17
50
|
attr_reader :root_dir
|
18
51
|
# Content of the Gemfile generated to install autoproj itself
|
@@ -220,6 +253,10 @@ def default_gemfile_contents(autoproj_version = ">= 2.0.0")
|
|
220
253
|
"gem \"utilrb\", \">= 3.0.1\""].join("\n")
|
221
254
|
end
|
222
255
|
|
256
|
+
def add_seed_config(path)
|
257
|
+
@config.merge!(YAML.safe_load(File.read(path), [Symbol]))
|
258
|
+
end
|
259
|
+
|
223
260
|
# Parse the provided command line options and returns the non-options
|
224
261
|
def parse_options(args = ARGV)
|
225
262
|
options = OptionParser.new do |opt|
|
@@ -232,54 +269,63 @@ def parse_options(args = ARGV)
|
|
232
269
|
opt.on '--debug', 'Run in debug mode' do
|
233
270
|
@autoproj_options << '--debug'
|
234
271
|
end
|
235
|
-
opt.on '--gem-source=URL', String,
|
236
|
-
|
272
|
+
opt.on '--gem-source=URL', String, 'use this source for RubyGems '\
|
273
|
+
'instead of rubygems.org' do |url|
|
237
274
|
@gem_source = url
|
238
275
|
end
|
239
|
-
opt.on '--gems-path=PATH',
|
240
|
-
|
276
|
+
opt.on '--gems-path=PATH', 'install gems under this path instead '\
|
277
|
+
'of ~/.autoproj/gems' do |path|
|
241
278
|
self.gems_install_path = path
|
242
279
|
end
|
243
280
|
opt.on '--public-gems', "install gems in the default gem location" do
|
244
281
|
self.install_gems_in_gem_user_dir
|
245
282
|
end
|
246
|
-
opt.on '--version=VERSION_CONSTRAINT', String, 'use the provided
|
247
|
-
|
283
|
+
opt.on '--bundler-version=VERSION_CONSTRAINT', String, 'use the provided '\
|
284
|
+
'string as a version constraint for bundler' do |version|
|
285
|
+
@config['bundler_version'] = version
|
286
|
+
end
|
287
|
+
opt.on '--version=VERSION_CONSTRAINT', String, 'use the provided '\
|
288
|
+
'string as a version constraint for autoproj' do |version|
|
248
289
|
if @gemfile
|
249
290
|
raise "cannot give both --version and --gemfile"
|
250
291
|
end
|
251
292
|
@gemfile = default_gemfile_contents(version)
|
252
293
|
end
|
253
|
-
opt.on '--gemfile=PATH', String, 'use the given Gemfile to install
|
254
|
-
|
294
|
+
opt.on '--gemfile=PATH', String, 'use the given Gemfile to install '\
|
295
|
+
'autoproj instead of the default' do |path|
|
255
296
|
if @gemfile
|
256
297
|
raise "cannot give both --version and --gemfile"
|
257
298
|
end
|
258
299
|
@gemfile = File.read(path)
|
259
300
|
end
|
260
|
-
opt.on '--seed-config
|
261
|
-
|
262
|
-
|
301
|
+
opt.on '--no-seed-config',
|
302
|
+
'when reinstalling an existing autoproj workspace, do not '\
|
303
|
+
'use the config in .autoproj/ as seed' do
|
304
|
+
@config.clear
|
305
|
+
end
|
306
|
+
opt.on '--seed-config=PATH', String, 'path to a seed file that '\
|
307
|
+
'should be used to initialize the configuration' do |path|
|
308
|
+
add_seed_config(path)
|
263
309
|
end
|
264
|
-
opt.on '--prefer-os-independent-packages', 'prefer OS-independent
|
265
|
-
|
266
|
-
|
310
|
+
opt.on '--prefer-os-independent-packages', 'prefer OS-independent '\
|
311
|
+
'packages (such as a RubyGem) over their OS-packaged equivalent '\
|
312
|
+
'(e.g. the thor gem vs. the ruby-thor debian package)' do
|
267
313
|
@prefer_indep_over_os_packages = true
|
268
314
|
end
|
269
|
-
opt.on '--[no-]color', 'do not use colored output (enabled by
|
270
|
-
|
315
|
+
opt.on '--[no-]color', 'do not use colored output (enabled by '\
|
316
|
+
'default if the terminal supports it)' do |color|
|
271
317
|
if color then @autoproj_options << "--color"
|
272
318
|
else @autoproj_options << '--no-color'
|
273
319
|
end
|
274
320
|
end
|
275
|
-
opt.on '--[no-]progress', 'do not use progress output (enabled by
|
276
|
-
|
321
|
+
opt.on '--[no-]progress', 'do not use progress output (enabled by '\
|
322
|
+
'default if the terminal supports it)' do |progress|
|
277
323
|
if progress then @autoproj_options << "--progress"
|
278
324
|
else @autoproj_options << '--no-progress'
|
279
325
|
end
|
280
326
|
end
|
281
|
-
opt.on '--[no-]interactive', 'if non-interactive, use default
|
282
|
-
|
327
|
+
opt.on '--[no-]interactive', 'if non-interactive, use default '\
|
328
|
+
'answer for questions' do |flag|
|
283
329
|
if flag then @autoproj_options << "--interactive"
|
284
330
|
else @autoproj_options << "--no-interactive"
|
285
331
|
end
|
@@ -289,22 +335,50 @@ def parse_options(args = ARGV)
|
|
289
335
|
@autoproj_options + args
|
290
336
|
end
|
291
337
|
|
292
|
-
def
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
return unless $?.success?
|
338
|
+
def bundler_version
|
339
|
+
@config['bundler_version']
|
340
|
+
end
|
341
|
+
|
342
|
+
def find_bundler(gem_program, version: nil)
|
298
343
|
bundler_path = File.join(gems_gem_home, 'bin', 'bundle')
|
299
|
-
|
300
|
-
|
301
|
-
|
344
|
+
return unless File.exist?(bundler_path)
|
345
|
+
|
346
|
+
setup_paths =
|
347
|
+
if version
|
348
|
+
find_versioned_bundler_setup(gem_program, version)
|
349
|
+
else
|
350
|
+
find_unversioned_bundler_setup(gem_program)
|
302
351
|
end
|
352
|
+
|
353
|
+
setup_paths.each do |setup_path|
|
354
|
+
return bundler_path if setup_path.start_with?(gems_gem_home)
|
303
355
|
end
|
304
|
-
|
356
|
+
nil
|
357
|
+
end
|
358
|
+
|
359
|
+
def find_versioned_bundler_setup(gem_program, version)
|
360
|
+
contents = IO.popen(
|
361
|
+
[env_for_child, Gem.ruby, gem_program,
|
362
|
+
'contents', '-v', version, 'bundler'],
|
363
|
+
&:readlines
|
364
|
+
)
|
365
|
+
return [] unless $CHILD_STATUS.success?
|
366
|
+
|
367
|
+
contents.grep(%r{bundler/setup.rb$})
|
368
|
+
end
|
369
|
+
|
370
|
+
def find_unversioned_bundler_setup(gem_program)
|
371
|
+
setup_paths = IO.popen(
|
372
|
+
[env_for_child, Gem.ruby, gem_program,
|
373
|
+
'which', '-a', 'bundler/setup'],
|
374
|
+
&:readlines
|
375
|
+
)
|
376
|
+
return [] unless $CHILD_STATUS.success?
|
377
|
+
|
378
|
+
setup_paths
|
305
379
|
end
|
306
380
|
|
307
|
-
def install_bundler(gem_program, silent: false)
|
381
|
+
def install_bundler(gem_program, version: nil, silent: false)
|
308
382
|
local = ['--local'] if local?
|
309
383
|
|
310
384
|
redirection = Hash.new
|
@@ -312,6 +386,9 @@ def install_bundler(gem_program, silent: false)
|
|
312
386
|
redirection = Hash[out: :close]
|
313
387
|
end
|
314
388
|
|
389
|
+
version_args = []
|
390
|
+
version_args << '-v' << version if version
|
391
|
+
|
315
392
|
# Shut up the bundler warning about 'bin' not being in PATH
|
316
393
|
env = self.env
|
317
394
|
env['PATH'] += [File.join(gems_gem_home, 'bin')]
|
@@ -322,14 +399,14 @@ def install_bundler(gem_program, silent: false)
|
|
322
399
|
'--clear-sources', '--source', gem_source,
|
323
400
|
'--no-user-install', '--install-dir', gems_gem_home,
|
324
401
|
*local, "--bindir=#{File.join(gems_gem_home, 'bin')}",
|
325
|
-
'bundler', **redirection)
|
402
|
+
'bundler', *version_args, **redirection)
|
326
403
|
|
327
404
|
if !result
|
328
405
|
STDERR.puts "FATAL: failed to install bundler in #{gems_gem_home}"
|
329
406
|
nil
|
330
407
|
end
|
331
408
|
|
332
|
-
if (bundler_path = find_bundler(gem_program))
|
409
|
+
if (bundler_path = find_bundler(gem_program, version: version))
|
333
410
|
bundler_path
|
334
411
|
else
|
335
412
|
STDERR.puts "gem install bundler returned successfully, but still "\
|
@@ -338,7 +415,7 @@ def install_bundler(gem_program, silent: false)
|
|
338
415
|
end
|
339
416
|
end
|
340
417
|
|
341
|
-
def install_autoproj(bundler)
|
418
|
+
def install_autoproj(bundler, bundler_version: self.bundler_version)
|
342
419
|
# Force bundler to update. If the user does not want this, let
|
343
420
|
# him specify a Gemfile with tighter version constraints
|
344
421
|
lockfile = File.join(dot_autoproj, 'Gemfile.lock')
|
@@ -353,14 +430,19 @@ def install_autoproj(bundler)
|
|
353
430
|
opts << "--path=#{gems_install_path}"
|
354
431
|
shims_path = File.join(dot_autoproj, 'bin')
|
355
432
|
|
356
|
-
|
357
|
-
|
358
|
-
"--gemfile=#{autoproj_gemfile_path}",
|
359
|
-
"--shebang=#{Gem.ruby}",
|
360
|
-
"--binstubs=#{shims_path}",
|
361
|
-
*opts, chdir: dot_autoproj)
|
433
|
+
version_arg = []
|
434
|
+
version_arg << "_#{bundler_version}_" if bundler_version
|
362
435
|
|
363
|
-
|
436
|
+
result = system(
|
437
|
+
clean_env,
|
438
|
+
Gem.ruby, bundler, *version_arg, 'install',
|
439
|
+
"--gemfile=#{autoproj_gemfile_path}",
|
440
|
+
"--shebang=#{Gem.ruby}",
|
441
|
+
"--binstubs=#{shims_path}",
|
442
|
+
*opts, chdir: dot_autoproj
|
443
|
+
)
|
444
|
+
|
445
|
+
unless result
|
364
446
|
STDERR.puts "FATAL: failed to install autoproj in #{dot_autoproj}"
|
365
447
|
exit 1
|
366
448
|
end
|
@@ -369,7 +451,7 @@ def install_autoproj(bundler)
|
|
369
451
|
root_dir, autoproj_gemfile_path, gems_gem_home)
|
370
452
|
end
|
371
453
|
|
372
|
-
EXCLUDED_FROM_SHIMS = %w
|
454
|
+
EXCLUDED_FROM_SHIMS = %w[rake thor].freeze
|
373
455
|
|
374
456
|
def self.rewrite_shims(shim_path, ruby_executable,
|
375
457
|
root_dir, autoproj_gemfile_path, gems_gem_home)
|
@@ -425,11 +507,7 @@ def self.shim_bundler(script_lines, ruby_executable, autoproj_gemfile_path, gems
|
|
425
507
|
#
|
426
508
|
|
427
509
|
# Autoproj generated preamble
|
428
|
-
|
429
|
-
Bundler.with_clean_env do
|
430
|
-
exec($0, *ARGV)
|
431
|
-
end
|
432
|
-
end
|
510
|
+
#{WITHOUT_BUNDLER}
|
433
511
|
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
|
434
512
|
ENV['GEM_HOME'] = '#{gems_gem_home}'
|
435
513
|
ENV.delete('GEM_PATH')
|
@@ -441,12 +519,7 @@ def self.shim_bundler(script_lines, ruby_executable, autoproj_gemfile_path, gems
|
|
441
519
|
def self.shim_bundler_old(ruby_executable, autoproj_gemfile_path, gems_gem_home)
|
442
520
|
"#! #{ruby_executable}
|
443
521
|
|
444
|
-
|
445
|
-
Bundler.with_clean_env do
|
446
|
-
exec($0, *ARGV)
|
447
|
-
end
|
448
|
-
end
|
449
|
-
|
522
|
+
#{WITHOUT_BUNDLER}
|
450
523
|
ENV['BUNDLE_GEMFILE'] ||= '#{autoproj_gemfile_path}'
|
451
524
|
ENV['GEM_HOME'] = '#{gems_gem_home}'
|
452
525
|
ENV.delete('GEM_PATH')
|
@@ -471,14 +544,7 @@ def self.shim_script(script_lines, ruby_executable, root_dir,
|
|
471
544
|
#
|
472
545
|
|
473
546
|
# Autoproj generated preamble, v1
|
474
|
-
|
475
|
-
Bundler.with_clean_env do
|
476
|
-
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
477
|
-
end
|
478
|
-
elsif ENV['RUBYLIB']
|
479
|
-
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
480
|
-
end
|
481
|
-
|
547
|
+
#{RUBYLIB_REINIT}
|
482
548
|
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
|
483
549
|
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
|
484
550
|
Gem.paths = Hash['GEM_HOME' => '#{gems_gem_home}', 'GEM_PATH' => '']
|
@@ -490,14 +556,7 @@ def self.shim_script_old(ruby_executable, root_dir, autoproj_gemfile_path,
|
|
490
556
|
gems_gem_home, load_line)
|
491
557
|
"#! #{ruby_executable}
|
492
558
|
|
493
|
-
|
494
|
-
Bundler.with_clean_env do
|
495
|
-
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
496
|
-
end
|
497
|
-
elsif ENV['RUBYLIB']
|
498
|
-
exec(Hash['RUBYLIB' => nil], $0, *ARGV)
|
499
|
-
end
|
500
|
-
|
559
|
+
#{RUBYLIB_REINIT}
|
501
560
|
ENV['BUNDLE_GEMFILE'] = '#{autoproj_gemfile_path}'
|
502
561
|
ENV['AUTOPROJ_CURRENT_ROOT'] = '#{root_dir}'
|
503
562
|
require 'rubygems'
|
@@ -591,8 +650,11 @@ def gem_bindir
|
|
591
650
|
#
|
592
651
|
# So, we're calling 'gem' as a subcommand to discovery the
|
593
652
|
# actual bindir
|
594
|
-
bindir = IO.popen(
|
595
|
-
|
653
|
+
bindir = IO.popen(
|
654
|
+
env_for_child,
|
655
|
+
[Gem.ruby, '-e', 'puts "#{Gem.user_dir}/bin"'], # rubocop:disable Lint/InterpolationCheck
|
656
|
+
&:read
|
657
|
+
)
|
596
658
|
if bindir
|
597
659
|
@gem_bindir = bindir.chomp
|
598
660
|
else
|
@@ -600,11 +662,11 @@ def gem_bindir
|
|
600
662
|
end
|
601
663
|
end
|
602
664
|
|
603
|
-
def install
|
665
|
+
def install(bundler_version: self.bundler_version)
|
604
666
|
if ENV['BUNDLER_GEMFILE']
|
605
667
|
raise "cannot run autoproj_install or autoproj_bootstrap while "\
|
606
|
-
|
607
|
-
|
668
|
+
"under a 'bundler exec' subcommand or having loaded an "\
|
669
|
+
"env.sh. Open a new console and try again"
|
608
670
|
end
|
609
671
|
|
610
672
|
gem_program = self.class.guess_gem_program
|
@@ -612,13 +674,12 @@ def install
|
|
612
674
|
env['GEM_HOME'] = [gems_gem_home]
|
613
675
|
env['GEM_PATH'] = [gems_gem_home]
|
614
676
|
|
615
|
-
if bundler = find_bundler(gem_program)
|
677
|
+
if (bundler = find_bundler(gem_program, version: bundler_version))
|
616
678
|
puts "Detected bundler at #{bundler}"
|
617
679
|
else
|
618
680
|
puts "Installing bundler in #{gems_gem_home}"
|
619
|
-
|
620
|
-
|
621
|
-
end
|
681
|
+
bundler = install_bundler(gem_program, version: bundler_version)
|
682
|
+
exit(1) unless bundler
|
622
683
|
end
|
623
684
|
self.class.rewrite_shims(
|
624
685
|
File.join(dot_autoproj, 'bin'),
|
@@ -630,7 +691,7 @@ def install
|
|
630
691
|
save_gemfile
|
631
692
|
|
632
693
|
puts "Installing autoproj in #{gems_gem_home}"
|
633
|
-
install_autoproj(bundler)
|
694
|
+
install_autoproj(bundler, bundler_version: bundler_version)
|
634
695
|
end
|
635
696
|
|
636
697
|
def load_config
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Autoproj
|
2
|
+
module Ops
|
3
|
+
# Common logic to generate build/import/utility reports
|
4
|
+
class PhaseReporting
|
5
|
+
def initialize(name, path, metadata_get)
|
6
|
+
@name = name
|
7
|
+
@path = path
|
8
|
+
@metadata_get = metadata_get
|
9
|
+
end
|
10
|
+
|
11
|
+
def create_report(autobuild_packages)
|
12
|
+
info = autobuild_packages.each_with_object({}) do |p, map|
|
13
|
+
map[p.name] = @metadata_get.call(p)
|
14
|
+
end
|
15
|
+
|
16
|
+
dump = JSON.dump(
|
17
|
+
"#{@name}_report" => {
|
18
|
+
'timestamp' => Time.now,
|
19
|
+
'packages' => info
|
20
|
+
}
|
21
|
+
)
|
22
|
+
|
23
|
+
FileUtils.mkdir_p File.dirname(@path)
|
24
|
+
File.open(@path, 'w') do |io|
|
25
|
+
io.write dump
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def initialize_incremental_report
|
30
|
+
FileUtils.mkdir_p File.dirname(@path)
|
31
|
+
@incremental_report = ""
|
32
|
+
end
|
33
|
+
|
34
|
+
def report_incremental(autobuild_package)
|
35
|
+
new_metadata = @metadata_get.call(autobuild_package)
|
36
|
+
prefix = @incremental_report.empty? ? "\n" : ",\n"
|
37
|
+
@incremental_report.concat(
|
38
|
+
"#{prefix}\"#{autobuild_package.name}\": #{JSON.dump(new_metadata)}"
|
39
|
+
)
|
40
|
+
File.open(@path, 'w') do |io|
|
41
|
+
io.write "{ \"#{@name}_report\": "\
|
42
|
+
"{\"timestamp\": #{JSON.dump(Time.now)}, \"packages\": {"
|
43
|
+
io.write(@incremental_report)
|
44
|
+
io.write "}}}"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -119,6 +119,7 @@ def error_or_warn(package, error)
|
|
119
119
|
|
120
120
|
def snapshot_packages(packages, target_dir = nil, only_local: true, fingerprint: false)
|
121
121
|
result = Array.new
|
122
|
+
fingerprint_memo = Hash.new
|
122
123
|
packages.each do |package_name|
|
123
124
|
package = manifest.find_package_definition(package_name)
|
124
125
|
if !package
|
@@ -141,7 +142,7 @@ def snapshot_packages(packages, target_dir = nil, only_local: true, fingerprint:
|
|
141
142
|
end
|
142
143
|
|
143
144
|
if fingerprint
|
144
|
-
vcs_info['fingerprint'] = package.autobuild.fingerprint
|
145
|
+
vcs_info['fingerprint'] = package.autobuild.fingerprint(memo: fingerprint_memo)
|
145
146
|
end
|
146
147
|
|
147
148
|
if vcs_info
|
data/lib/autoproj/ops/tools.rb
CHANGED