autoproj 1.7.20 → 1.7.21.b1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/autoproj CHANGED
@@ -260,21 +260,21 @@ EOTEXT
260
260
 
261
261
  if Autoproj::CmdLine.update_envsh?
262
262
  Autoproj.export_env_sh
263
- Autoproj.progress "autoproj: updated #{Autoproj.root_dir}/env.sh", :green
263
+ Autoproj.message "autoproj: updated #{Autoproj.root_dir}/env.sh", :green
264
264
  end
265
265
 
266
266
  if Autoproj::CmdLine.show_statistics?
267
267
  per_phase = Hash.new
268
268
  per_type = Hash.new
269
269
 
270
- Autoproj.progress
271
- Autoproj.progress "statistics about the build", :bold
270
+ Autoproj.message
271
+ Autoproj.message "statistics about the build", :bold
272
272
 
273
273
  Autoproj.manifest.each_package.sort_by(&:name).each do |pkg|
274
274
  next if pkg.statistics.empty?
275
275
 
276
276
  if per_phase.empty?
277
- Autoproj.progress "detailed per package"
277
+ Autoproj.message "detailed per package"
278
278
  end
279
279
 
280
280
  puts " #{pkg.name}: %.1fs" % [pkg.statistics.values.inject(&:+)]
@@ -289,21 +289,21 @@ EOTEXT
289
289
  end
290
290
 
291
291
  if !per_type.empty?
292
- Autoproj.progress
293
- Autoproj.progress "detailed per package type"
292
+ Autoproj.message
293
+ Autoproj.message "detailed per package type"
294
294
  per_type.each do |pkg_type, phases|
295
- Autoproj.progress " #{pkg_type.name}: %.1fs" % [phases.values.inject(&:+)]
295
+ Autoproj.message " #{pkg_type.name}: %.1fs" % [phases.values.inject(&:+)]
296
296
  phases.each_key.sort.each do |phase_name|
297
- Autoproj.progress " #{phase_name}: %.1fs" % [phases[phase_name]]
297
+ Autoproj.message " #{phase_name}: %.1fs" % [phases[phase_name]]
298
298
  end
299
299
  end
300
300
  end
301
301
 
302
302
  if !per_phase.empty?
303
- Autoproj.progress
304
- Autoproj.progress "summary per phase"
303
+ Autoproj.message
304
+ Autoproj.message "summary per phase"
305
305
  per_phase.keys.sort.each do |phase_name|
306
- Autoproj.progress " #{phase_name}: %.1fs" % [per_phase[phase_name]]
306
+ Autoproj.message " #{phase_name}: %.1fs" % [per_phase[phase_name]]
307
307
  end
308
308
  end
309
309
  end
@@ -57,7 +57,7 @@ module Autoproj
57
57
  string
58
58
  end
59
59
 
60
- def self.progress(str)
60
+ def self.message(str)
61
61
  STDERR.puts " #{str}"
62
62
  end
63
63
  end
@@ -66,7 +66,7 @@ module Autobuild
66
66
  def self.do_update
67
67
  true
68
68
  end
69
- def self.progress(str)
69
+ def self.message(str)
70
70
  STDERR.puts " #{str}"
71
71
  end
72
72
 
@@ -168,7 +168,7 @@ module Autoproj
168
168
  def self.load_default
169
169
  file = ENV['AUTOPROJ_DEFAULT_OSDEPS'] || AUTOPROJ_OSDEPS
170
170
  if !File.file?(file)
171
- Autoproj.progress "WARN: #{file} (from AUTOPROJ_DEFAULT_OSDEPS) is not a file, falling back to #{AUTOPROJ_OSDEPS}"
171
+ Autoproj.warn "#{file} (from AUTOPROJ_DEFAULT_OSDEPS) is not a file, falling back to #{AUTOPROJ_OSDEPS}"
172
172
  file = AUTOPROJ_OSDEPS
173
173
  end
174
174
  OSDependencies.load(file)
@@ -188,7 +188,7 @@ module Autoproj
188
188
  # install RubyGems packages
189
189
  def gem_fetcher
190
190
  if !@gem_fetcher
191
- Autobuild.progress "looking for RubyGems updates"
191
+ Autoproj.message "looking for RubyGems updates"
192
192
  @gem_fetcher = Gem::SpecFetcher.fetcher
193
193
  end
194
194
  @gem_fetcher
@@ -318,7 +318,7 @@ module Autoproj
318
318
  @operating_system = [names.split(','), versions.split(',')]
319
319
  end
320
320
  else
321
- Autoproj.progress " autodetecting the operating system"
321
+ Autoproj.message " autodetecting the operating system"
322
322
  name, versions = os_from_lsb
323
323
  if name
324
324
  if name != "debian"
@@ -411,7 +411,7 @@ module Autoproj
411
411
  if package_name =~ /^(\w[a-z0-9+-.]+)/
412
412
  @dpkg_installed_packages.include?($1)
413
413
  else
414
- Autoproj.progress "WARN: #{package_name} is not a valid Debian package name"
414
+ Autoproj.warn "#{package_name} is not a valid Debian package name"
415
415
  false
416
416
  end
417
417
  end
@@ -527,7 +527,7 @@ fi
527
527
  end
528
528
  end
529
529
  if Autoproj.verbose
530
- Autoproj.progress "selected OS version #{found} for osdep #{name}: #{version_entry.inspect}"
530
+ Autoproj.message "selected OS version #{found} for osdep #{name}: #{version_entry.inspect}"
531
531
  end
532
532
 
533
533
  if !version_entry
@@ -1052,17 +1052,17 @@ So, what do you want ? (all, ruby, os or none)
1052
1052
  user_shell_script = generate_user_os_script(os_names, os_packages)
1053
1053
  end
1054
1054
  if osdeps_interaction(osdeps, os_packages, user_shell_script, silent?)
1055
- Autoproj.progress " installing OS packages: #{os_packages.sort.join(", ")}"
1055
+ Autoproj.message " installing OS packages: #{os_packages.sort.join(", ")}"
1056
1056
 
1057
1057
  if Autoproj.verbose
1058
- Autoproj.progress "Generating installation script for non-ruby OS dependencies"
1059
- Autoproj.progress shell_script
1058
+ Autoproj.message "Generating installation script for non-ruby OS dependencies"
1059
+ Autoproj.message shell_script
1060
1060
  end
1061
1061
 
1062
1062
  File.open('/tmp/autoproj_osdeps_lock', 'w') do |lock_io|
1063
1063
  begin
1064
1064
  while !lock_io.flock(File::LOCK_EX | File::LOCK_NB)
1065
- Autoproj.progress " waiting for other autoproj instances to finish their osdeps installation"
1065
+ Autoproj.message " waiting for other autoproj instances to finish their osdeps installation"
1066
1066
  sleep 5
1067
1067
  end
1068
1068
 
@@ -1104,7 +1104,7 @@ So, what do you want ? (all, ruby, os or none)
1104
1104
  end
1105
1105
 
1106
1106
  if gems_interaction(gems, cmdlines, silent?)
1107
- Autobuild.progress "installing/updating RubyGems dependencies: #{gems.map { |g| g.join(" ") }.sort.join(", ")}"
1107
+ Autoproj.message "installing/updating RubyGems dependencies: #{gems.map { |g| g.join(" ") }.sort.join(", ")}"
1108
1108
 
1109
1109
  cmdlines.each do |c|
1110
1110
  Autobuild::Subprocess.run 'autoproj', 'osdeps', *c
@@ -1182,7 +1182,7 @@ module Autoproj
1182
1182
  validate(answer)
1183
1183
 
1184
1184
  rescue InputError => e
1185
- Autoproj.progress("invalid value: #{e.message}", :red)
1185
+ Autoproj.message("invalid value: #{e.message}", :red)
1186
1186
  retry
1187
1187
  end
1188
1188
 
@@ -1250,7 +1250,7 @@ module Autoproj
1250
1250
  if doc[-1, 1] != "?"
1251
1251
  doc = "#{doc}:"
1252
1252
  end
1253
- Autoproj.progress " #{doc} #{value}"
1253
+ Autoproj.message " #{doc} #{value}"
1254
1254
  @user_config[key] = [value, true]
1255
1255
  end
1256
1256
  value
@@ -1449,9 +1449,9 @@ module Autoproj
1449
1449
  if shell_kind =~ /^\w+$/
1450
1450
  shell_file = File.join(shell_dir, "autoproj_#{shell_kind}")
1451
1451
  if File.exists?(shell_file)
1452
- Autoproj.progress
1453
- Autoproj.progress "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
1454
- Autoproj.progress "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
1452
+ Autoproj.message
1453
+ Autoproj.message "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
1454
+ Autoproj.message "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
1455
1455
  Autobuild.env_source_file(shell_file)
1456
1456
  end
1457
1457
  end
@@ -1500,7 +1500,7 @@ module Autoproj
1500
1500
 
1501
1501
  output = `ldd -r #{name} 2>&1`
1502
1502
  if output =~ /undefined symbol/
1503
- Autoproj.progress(" WARN: #{name} has undefined symbols", :magenta)
1503
+ Autoproj.message(" WARN: #{name} has undefined symbols", :magenta)
1504
1504
  end
1505
1505
  end
1506
1506
  end
@@ -61,12 +61,12 @@ module Autobuild
61
61
  post_install do
62
62
  path = File.join(prefix, 'lib', 'pkgconfig')
63
63
  Dir.glob(File.join(path, "#{name}-*.pc")) do |pcfile|
64
- Autoproj.progress " removing obsolete file #{pcfile}", :bold
64
+ Autoproj.message " removing obsolete file #{pcfile}", :bold
65
65
  FileUtils.rm_f pcfile
66
66
  end
67
67
  pcfile = File.join(path, "orogen-project-#{name}.pc")
68
68
  if File.exists?(pcfile)
69
- Autoproj.progress " removing obsolete file #{pcfile}", :bold
69
+ Autoproj.message " removing obsolete file #{pcfile}", :bold
70
70
  FileUtils.rm_f pcfile
71
71
  end
72
72
  end
@@ -78,7 +78,7 @@ module Autobuild
78
78
  post_install do
79
79
  path = File.join(prefix, *path)
80
80
  if File.exists?(path)
81
- Autoproj.progress " removing obsolete file #{path}", :bold
81
+ Autoproj.message " removing obsolete file #{path}", :bold
82
82
  FileUtils.rm_f path
83
83
  end
84
84
  end
@@ -180,16 +180,16 @@ module Autoproj
180
180
  class Reporter < Autobuild::Reporter
181
181
  def error(error)
182
182
  error_lines = error.to_s.split("\n")
183
- Autoproj.progress("Build failed", :bold, :red)
184
- Autoproj.progress("#{error_lines.shift}", :bold, :red)
183
+ Autoproj.message("Build failed", :bold, :red)
184
+ Autoproj.message("#{error_lines.shift}", :bold, :red)
185
185
  error_lines.each do |line|
186
- Autoproj.progress line
186
+ Autoproj.message line
187
187
  end
188
188
  end
189
189
  def success
190
- Autoproj.progress("Build finished successfully at #{Time.now}", :bold, :green)
190
+ Autoproj.message("Build finished successfully at #{Time.now}", :bold, :green)
191
191
  if Autobuild.post_success_message
192
- Autoproj.progress Autobuild.post_success_message
192
+ Autoproj.message Autobuild.post_success_message
193
193
  end
194
194
  end
195
195
  end
@@ -452,18 +452,19 @@ def ruby_package(options)
452
452
 
453
453
  # Set up code
454
454
  pkg.post_install do
455
- Autobuild.progress "setting up Ruby package #{pkg.name}"
456
- Autobuild.update_environment pkg.srcdir
457
- # Add lib/ unconditionally, as we know that it is a ruby package.
458
- # Autobuild will add it only if there is a .rb file in the directory
459
- libdir = File.join(pkg.srcdir, 'lib')
460
- if File.directory?(libdir)
461
- Autobuild.env_add_path 'RUBYLIB', libdir
462
- end
455
+ pkg.progress_start "setting up Ruby package %s" do
456
+ Autobuild.update_environment pkg.srcdir
457
+ # Add lib/ unconditionally, as we know that it is a ruby package.
458
+ # Autobuild will add it only if there is a .rb file in the directory
459
+ libdir = File.join(pkg.srcdir, 'lib')
460
+ if File.directory?(libdir)
461
+ Autobuild.env_add_path 'RUBYLIB', libdir
462
+ end
463
463
 
464
- if pkg.rake_setup_task && File.file?(File.join(pkg.srcdir, 'Rakefile'))
465
- Autobuild::Subprocess.run pkg, 'post-install',
466
- 'rake', pkg.rake_setup_task
464
+ if pkg.rake_setup_task && File.file?(File.join(pkg.srcdir, 'Rakefile'))
465
+ Autobuild::Subprocess.run pkg, 'post-install',
466
+ 'rake', pkg.rake_setup_task, :working_directory => pkg.srcdir
467
+ end
467
468
  end
468
469
  end
469
470
 
@@ -474,8 +475,9 @@ def ruby_package(options)
474
475
  # rake_doc_task to nil
475
476
  if !pkg.has_doc? && pkg.rake_doc_task
476
477
  pkg.doc_task do
477
- pkg.progress "generating documentation for %s"
478
- Autobuild::Subprocess.run pkg, 'doc', 'rake', pkg.rake_doc_task
478
+ pkg.progress_start "generating documentation for %s" do
479
+ Autobuild::Subprocess.run pkg, 'doc', 'rake', pkg.rake_doc_task, :working_directory => pkg.srcdir
480
+ end
479
481
  end
480
482
  end
481
483
  end
@@ -10,34 +10,24 @@ module Autoproj
10
10
  @verbose = false
11
11
  @console = HighLine.new
12
12
 
13
- def self.progress(*args)
13
+ def self.message(*args)
14
14
  if !silent?
15
- if args.empty?
16
- puts
17
- elsif CmdLine.color?
18
- STDERR.puts console.color(*args)
19
- else
20
- STDERR.puts args.first
21
- end
15
+ Autobuild.message(*args)
22
16
  end
23
17
  end
24
18
 
25
19
  def self.color(*args)
26
- if CmdLine.color?
27
- console.color(*args)
28
- else
29
- args.first
30
- end
20
+ Autobuild.color(*args)
31
21
  end
32
22
 
33
23
  # Displays an error message
34
24
  def self.error(message)
35
- Autoproj.progress(" ERROR: #{message}", :red, :bold)
25
+ Autoproj.message(" ERROR: #{message}", :red, :bold)
36
26
  end
37
27
 
38
28
  # Displays a warning message
39
29
  def self.warn(message)
40
- Autoproj.progress(" WARN: #{message}", :magenta)
30
+ Autoproj.message(" WARN: #{message}", :magenta)
41
31
  end
42
32
 
43
33
  module CmdLine
@@ -161,7 +151,7 @@ module Autoproj
161
151
  # First things first, see if we need to update ourselves
162
152
  if Autoproj.osdeps.install(%w{autobuild autoproj})
163
153
  puts
164
- Autoproj.progress 'autoproj and/or autobuild has been updated, restarting autoproj'
154
+ Autoproj.message 'autoproj and/or autobuild has been updated, restarting autoproj'
165
155
  puts
166
156
 
167
157
  # We updated autobuild or autoproj themselves ... Restart !
@@ -197,11 +187,11 @@ module Autoproj
197
187
 
198
188
  # Load the required autobuild definitions
199
189
  if !silent
200
- Autoproj.progress("autoproj: loading ...", :bold)
190
+ Autoproj.message("autoproj: loading ...", :bold)
201
191
  if !Autoproj.reconfigure?
202
- Autoproj.progress("run 'autoproj reconfigure' to change configuration options", :bold)
203
- Autoproj.progress("and use 'autoproj switch-config' to change the remote source for", :bold)
204
- Autoproj.progress("autoproj's main build configuration", :bold)
192
+ Autoproj.message("run 'autoproj reconfigure' to change configuration options", :bold)
193
+ Autoproj.message("and use 'autoproj switch-config' to change the remote source for", :bold)
194
+ Autoproj.message("autoproj's main build configuration", :bold)
205
195
  end
206
196
  end
207
197
  manifest.each_autobuild_file do |source, name|
@@ -226,7 +216,7 @@ module Autoproj
226
216
  next if !File.directory?(full_path)
227
217
 
228
218
  if handler = Autoproj.package_handler_for(full_path)
229
- Autoproj.progress " auto-adding #{pkg_or_set} #{"in #{layout_level} " if layout_level != "/"}using the #{handler.gsub(/_package/, '')} package handler"
219
+ Autoproj.message " auto-adding #{pkg_or_set} #{"in #{layout_level} " if layout_level != "/"}using the #{handler.gsub(/_package/, '')} package handler"
230
220
  Autoproj.in_package_set(manifest.local_package_set, manifest.file) do
231
221
  send(handler, pkg_or_set)
232
222
  end
@@ -264,7 +254,7 @@ module Autoproj
264
254
  # Update the remote sources if there are any
265
255
  if manifest.has_remote_sources?
266
256
  if manifest.should_update_remote_sources
267
- Autoproj.progress("autoproj: updating remote definitions of package sets", :bold)
257
+ Autoproj.message("autoproj: updating remote definitions of package sets", :bold)
268
258
  end
269
259
 
270
260
  # If we need to install some packages to import our remote sources, do it
@@ -275,7 +265,7 @@ module Autoproj
275
265
  if manifest.should_update_remote_sources
276
266
  manifest.update_remote_sources
277
267
  end
278
- Autoproj.progress
268
+ Autoproj.message
279
269
  end
280
270
  end
281
271
 
@@ -386,52 +376,52 @@ module Autoproj
386
376
  end
387
377
 
388
378
  if package_sets.empty?
389
- Autoproj.progress("autoproj: no package sets defined in autoproj/manifest", :bold, :red)
379
+ Autoproj.message("autoproj: no package sets defined in autoproj/manifest", :bold, :red)
390
380
  return
391
381
  end
392
382
 
393
- Autoproj.progress
394
- Autoproj.progress("autoproj: package sets", :bold)
383
+ Autoproj.message
384
+ Autoproj.message("autoproj: package sets", :bold)
395
385
  package_sets.sort_by(&:name).each do |pkg_set|
396
386
  next if pkg_set.empty?
397
387
  if pkg_set.imported_from
398
- Autoproj.progress "#{pkg_set.name} (imported by #{pkg_set.imported_from.name})"
388
+ Autoproj.message "#{pkg_set.name} (imported by #{pkg_set.imported_from.name})"
399
389
  else
400
- Autoproj.progress "#{pkg_set.name} (listed in manifest)"
390
+ Autoproj.message "#{pkg_set.name} (listed in manifest)"
401
391
  end
402
392
  if pkg_set.local?
403
- Autoproj.progress " local set in #{pkg_set.local_dir}"
393
+ Autoproj.message " local set in #{pkg_set.local_dir}"
404
394
  else
405
- Autoproj.progress " from: #{pkg_set.vcs}"
406
- Autoproj.progress " local: #{pkg_set.local_dir}"
395
+ Autoproj.message " from: #{pkg_set.vcs}"
396
+ Autoproj.message " local: #{pkg_set.local_dir}"
407
397
  end
408
398
 
409
399
  imports = pkg_set.each_imported_set.to_a
410
400
  if !imports.empty?
411
- Autoproj.progress " imports #{imports.size} package sets"
401
+ Autoproj.message " imports #{imports.size} package sets"
412
402
  if !pkg_set.auto_imports?
413
- Autoproj.progress " automatic imports are DISABLED for this set"
403
+ Autoproj.message " automatic imports are DISABLED for this set"
414
404
  end
415
405
  imports.each do |imported_set|
416
- Autoproj.progress " #{imported_set.name}"
406
+ Autoproj.message " #{imported_set.name}"
417
407
  end
418
408
  end
419
409
 
420
410
  set_packages = pkg_set.each_package.sort_by(&:name)
421
- Autoproj.progress " defines: #{set_packages.map(&:name).join(", ")}"
411
+ Autoproj.message " defines: #{set_packages.map(&:name).join(", ")}"
422
412
  end
423
413
 
424
- Autoproj.progress
425
- Autoproj.progress("autoproj: metapackages", :bold)
414
+ Autoproj.message
415
+ Autoproj.message("autoproj: metapackages", :bold)
426
416
  metapackages.sort_by(&:name).each do |metap|
427
- Autoproj.progress "#{metap.name}"
428
- Autoproj.progress " includes: #{metap.packages.map(&:name).sort.join(", ")}"
417
+ Autoproj.message "#{metap.name}"
418
+ Autoproj.message " includes: #{metap.packages.map(&:name).sort.join(", ")}"
429
419
  end
430
420
 
431
421
  packages_not_present = []
432
422
 
433
- Autoproj.progress
434
- Autoproj.progress("autoproj: packages", :bold)
423
+ Autoproj.message
424
+ Autoproj.message("autoproj: packages", :bold)
435
425
  all_packages.to_a.sort_by(&:first).map(&:last).each do |pkg, pkg_set|
436
426
  if File.exists?(File.join(pkg.srcdir, "manifest.xml"))
437
427
  manifest.load_package_manifest(pkg.name)
@@ -440,48 +430,48 @@ module Autoproj
440
430
 
441
431
  pkg_manifest = pkg.description
442
432
  vcs_def = manifest.importer_definition_for(pkg.name)
443
- Autoproj.progress "#{pkg.name}#{": #{pkg_manifest.short_documentation}" if pkg_manifest && pkg_manifest.short_documentation}", :bold
433
+ Autoproj.message "#{pkg.name}#{": #{pkg_manifest.short_documentation}" if pkg_manifest && pkg_manifest.short_documentation}", :bold
444
434
  tags = pkg.tags.to_a
445
435
  if tags.empty?
446
- Autoproj.progress " no tags"
436
+ Autoproj.message " no tags"
447
437
  else
448
- Autoproj.progress " tags: #{pkg.tags.to_a.sort.join(", ")}"
438
+ Autoproj.message " tags: #{pkg.tags.to_a.sort.join(", ")}"
449
439
  end
450
- Autoproj.progress " defined in package set #{pkg_set}"
440
+ Autoproj.message " defined in package set #{pkg_set}"
451
441
  if File.directory?(pkg.srcdir)
452
- Autoproj.progress " checked out in #{pkg.srcdir}"
442
+ Autoproj.message " checked out in #{pkg.srcdir}"
453
443
  else
454
- Autoproj.progress " will be checked out in #{pkg.srcdir}"
444
+ Autoproj.message " will be checked out in #{pkg.srcdir}"
455
445
  end
456
- Autoproj.progress " #{vcs_def.to_s}"
446
+ Autoproj.message " #{vcs_def.to_s}"
457
447
 
458
448
  if !File.directory?(pkg.srcdir)
459
449
  packages_not_present << pkg.name
460
- Autoproj.progress " NOT checked out yet, reported dependencies will be partial"
450
+ Autoproj.message " NOT checked out yet, reported dependencies will be partial"
461
451
  end
462
452
 
463
453
  optdeps = pkg.optional_dependencies.to_set
464
454
  real_deps = pkg.dependencies.to_a
465
455
  actual_real_deps = real_deps.find_all { |dep_name| !optdeps.include?(dep_name) }
466
456
  if !actual_real_deps.empty?
467
- Autoproj.progress " deps: #{actual_real_deps.join(", ")}"
457
+ Autoproj.message " deps: #{actual_real_deps.join(", ")}"
468
458
  end
469
459
 
470
460
  selected_opt_deps, opt_deps = optdeps.partition { |dep_name| real_deps.include?(dep_name) }
471
461
  if !selected_opt_deps.empty?
472
- Autoproj.progress " enabled opt deps: #{selected_opt_deps.join(", ")}"
462
+ Autoproj.message " enabled opt deps: #{selected_opt_deps.join(", ")}"
473
463
  end
474
464
  if !opt_deps.empty?
475
- Autoproj.progress " disabled opt deps: #{opt_deps.join(", ")}"
465
+ Autoproj.message " disabled opt deps: #{opt_deps.join(", ")}"
476
466
  end
477
467
 
478
468
  if !pkg.os_packages.empty?
479
- Autoproj.progress " OSdeps: #{pkg.os_packages.to_a.sort.join(", ")}"
469
+ Autoproj.message " OSdeps: #{pkg.os_packages.to_a.sort.join(", ")}"
480
470
  end
481
471
  end
482
472
 
483
473
  if !packages_not_present.empty?
484
- Autoproj.progress
474
+ Autoproj.message
485
475
  Autoproj.warn "the following packages are not yet checked out:"
486
476
  packages_not_present.each_slice(4) do |*packages|
487
477
  Autoproj.warn " #{packages.join(", ")}"
@@ -508,7 +498,7 @@ module Autoproj
508
498
  next if !File.directory?(sel)
509
499
  while sel != '/'
510
500
  if handler = Autoproj.package_handler_for(sel)
511
- Autoproj.progress " auto-adding #{sel} using the #{handler.gsub(/_package/, '')} package handler"
501
+ Autoproj.message " auto-adding #{sel} using the #{handler.gsub(/_package/, '')} package handler"
512
502
  sel = File.expand_path(sel)
513
503
  relative_to_root = Pathname.new(sel).relative_path_from(Pathname.new(Autoproj.root_dir))
514
504
  pkg = Autoproj.in_package_set(manifest.local_package_set, manifest.file) do
@@ -524,10 +514,10 @@ module Autoproj
524
514
  end
525
515
 
526
516
  if !nonresolved.empty?
527
- Autoproj.progress("autoproj: wrong package selection on command line, cannot find a match for #{nonresolved.to_a.join(", ")}", :red)
517
+ Autoproj.message("autoproj: wrong package selection on command line, cannot find a match for #{nonresolved.to_a.join(", ")}", :red)
528
518
  exit 1
529
519
  elsif Autoproj.verbose
530
- Autoproj.progress "will install #{selected_packages.to_a.join(", ")}"
520
+ Autoproj.message "will install #{selected_packages.to_a.join(", ")}"
531
521
  end
532
522
  selected_packages
533
523
  end
@@ -667,7 +657,7 @@ module Autoproj
667
657
  end
668
658
 
669
659
  if Autoproj.verbose
670
- Autoproj.progress "autoproj: finished importing packages"
660
+ Autoproj.message "autoproj: finished importing packages"
671
661
  end
672
662
  if Autoproj::CmdLine.list_newest?
673
663
  fields = []
@@ -686,7 +676,7 @@ module Autoproj
686
676
  end
687
677
  format = " %-#{field_sizes[0]}s %-#{field_sizes[1]}s at %-#{field_sizes[2]}s"
688
678
  fields.each do |line|
689
- Autoproj.progress(format % line)
679
+ Autoproj.message(format % line)
690
680
  end
691
681
  end
692
682
 
@@ -696,9 +686,9 @@ module Autoproj
696
686
  def self.build_packages(selected_packages, all_enabled_packages)
697
687
  if Autoproj::CmdLine.doc?
698
688
  Autobuild.only_doc = true
699
- Autoproj.progress("autoproj: building and installing documentation", :bold)
689
+ Autoproj.message("autoproj: building and installing documentation", :bold)
700
690
  else
701
- Autoproj.progress("autoproj: building and installing packages", :bold)
691
+ Autoproj.message("autoproj: building and installing packages", :bold)
702
692
  end
703
693
 
704
694
  if Autoproj::CmdLine.update_os_dependencies?
@@ -914,6 +904,10 @@ where 'mode' is one of:
914
904
  opts.on("--show", "in osdeps mode, show a per-package listing of the OS dependencies instead of installing them") do
915
905
  @show_osdeps = true
916
906
  end
907
+ opts.on('--version') do
908
+ Autoproj.message "autoproj v#{Autoproj::VERSION}"
909
+ Autoproj.message "autobuild v#{Autobuild::VERSION}"
910
+ end
917
911
  opts.on("--all", "in osdeps mode, install both OS packages and RubyGem packages, regardless of the otherwise selected mode") do
918
912
  @osdeps_forced_mode = 'all'
919
913
  end
@@ -1210,21 +1204,21 @@ where 'mode' is one of:
1210
1204
  end
1211
1205
 
1212
1206
  if last_was_in_sync
1213
- Autoproj.progress(": local and remote are in sync", :green)
1207
+ Autoproj.message(": local and remote are in sync", :green)
1214
1208
  end
1215
1209
 
1216
1210
  last_was_in_sync = false
1217
1211
  STDERR.print "#{pkg_name}:"
1218
1212
 
1219
1213
  if lines.size == 1
1220
- Autoproj.progress lines.first
1214
+ Autoproj.message lines.first
1221
1215
  else
1222
- Autoproj.progress
1223
- Autoproj.progress lines.join("\n")
1216
+ Autoproj.message
1217
+ Autoproj.message lines.join("\n")
1224
1218
  end
1225
1219
  end
1226
1220
  if last_was_in_sync
1227
- Autoproj.progress(": local and remote are in sync", :green)
1221
+ Autoproj.message(": local and remote are in sync", :green)
1228
1222
  end
1229
1223
  return result
1230
1224
  end
@@ -1238,13 +1232,13 @@ where 'mode' is one of:
1238
1232
  end
1239
1233
 
1240
1234
  if !sources.empty?
1241
- Autoproj.progress("autoproj: displaying status of configuration", :bold)
1235
+ Autoproj.message("autoproj: displaying status of configuration", :bold)
1242
1236
  display_status(sources)
1243
1237
  STDERR.puts
1244
1238
  end
1245
1239
 
1246
1240
 
1247
- Autoproj.progress("autoproj: displaying status of packages", :bold)
1241
+ Autoproj.message("autoproj: displaying status of packages", :bold)
1248
1242
  packages = packages.sort.map do |pkg_name|
1249
1243
  Autobuild::Package[pkg_name]
1250
1244
  end
@@ -1401,12 +1395,12 @@ where 'mode' is one of:
1401
1395
  if ENV['GEM_HOME'] && Autoproj.in_autoproj_installation?(ENV['GEM_HOME']) &&
1402
1396
  ENV['GEM_HOME'] != gem_home
1403
1397
  if !File.exists?(gem_home)
1404
- Autoproj.progress "autoproj: reusing bootstrap from #{File.dirname(ENV['GEM_HOME'])}"
1398
+ Autoproj.message "autoproj: reusing bootstrap from #{File.dirname(ENV['GEM_HOME'])}"
1405
1399
  FileUtils.cp_r ENV['GEM_HOME'], gem_home
1406
1400
  end
1407
1401
  ENV['GEM_HOME'] = gem_home
1408
1402
 
1409
- Autoproj.progress "restarting bootstrapping from #{Dir.pwd}"
1403
+ Autoproj.message "restarting bootstrapping from #{Dir.pwd}"
1410
1404
 
1411
1405
  require 'rbconfig'
1412
1406
  ruby = RbConfig::CONFIG['RUBY_INSTALL_NAME']
@@ -1422,7 +1416,7 @@ where 'mode' is one of:
1422
1416
 
1423
1417
  if args.size == 1 # the user asks us to download a manifest
1424
1418
  manifest_url = args.first
1425
- Autoproj.progress("autoproj: downloading manifest file #{manifest_url}", :bold)
1419
+ Autoproj.message("autoproj: downloading manifest file #{manifest_url}", :bold)
1426
1420
  manifest_data =
1427
1421
  begin open(manifest_url) { |file| file.read }
1428
1422
  rescue
@@ -1495,8 +1489,8 @@ export PATH=$GEM_HOME/bin:$PATH
1495
1489
  end
1496
1490
 
1497
1491
  if !result.empty?
1498
- Autoproj.progress pkg.name
1499
- Autoproj.progress " #{result.join("\n ")}"
1492
+ Autoproj.message pkg.name
1493
+ Autoproj.message " #{result.join("\n ")}"
1500
1494
  end
1501
1495
  end
1502
1496
  end
@@ -1534,9 +1528,9 @@ export PATH=$GEM_HOME/bin:$PATH
1534
1528
  io.write xml.to_xml
1535
1529
  end
1536
1530
  if !manifest
1537
- Autoproj.progress "created #{path}"
1531
+ Autoproj.message "created #{path}"
1538
1532
  else
1539
- Autoproj.progress "modified #{path}"
1533
+ Autoproj.message "modified #{path}"
1540
1534
  end
1541
1535
  end
1542
1536
  end
@@ -1555,10 +1549,10 @@ export PATH=$GEM_HOME/bin:$PATH
1555
1549
  package = Autobuild::Package[package_name]
1556
1550
  importer = package.importer
1557
1551
  if !importer
1558
- Autoproj.progress "cannot snapshot #{package_name} as it has no importer"
1552
+ Autoproj.message "cannot snapshot #{package_name} as it has no importer"
1559
1553
  next
1560
1554
  elsif !importer.respond_to?(:snapshot)
1561
- Autoproj.progress "cannot snapshot #{package_name} as the #{importer.class} importer does not support it"
1555
+ Autoproj.message "cannot snapshot #{package_name} as the #{importer.class} importer does not support it"
1562
1556
  next
1563
1557
  end
1564
1558
 
@@ -1771,8 +1765,8 @@ export PATH=$GEM_HOME/bin:$PATH
1771
1765
 
1772
1766
 
1773
1767
  root = Pathname.new(Autoproj.root_dir)
1774
- Autoproj.progress
1775
- Autoproj.progress "The following directories are not part of a package used in the current autoproj installation", :bold
1768
+ Autoproj.message
1769
+ Autoproj.message "The following directories are not part of a package used in the current autoproj installation", :bold
1776
1770
  unused.to_a.sort.each do |dir|
1777
1771
  puts " #{Pathname.new(dir).relative_path_from(root)}"
1778
1772
  end
@@ -1483,7 +1483,7 @@ module Autoproj
1483
1483
  next if updated_sets.has_key?(pkg_set.repository_id)
1484
1484
 
1485
1485
  if !pkg_set.explicit?
1486
- Autoproj.progress " #{pkg_set.imported_from.name}: auto-importing #{pkg_set.name}"
1486
+ Autoproj.message " #{pkg_set.imported_from.name}: auto-importing #{pkg_set.name}"
1487
1487
  end
1488
1488
  known_remotes << update_remote_set(pkg_set, remotes_symlinks_dir)
1489
1489
  updated_sets[pkg_set.repository_id] = pkg_set
@@ -2014,7 +2014,7 @@ module Autoproj
2014
2014
  end
2015
2015
  if ignored?(pkg)
2016
2016
  if Autoproj.verbose
2017
- Autoproj.progress "ignoring osdeps package #{pkg}"
2017
+ Autoproj.message "ignoring osdeps package #{pkg}"
2018
2018
  end
2019
2019
  true
2020
2020
  end
@@ -61,7 +61,7 @@ module Autoproj
61
61
  validate(answer)
62
62
 
63
63
  rescue InputError => e
64
- Autoproj.progress("invalid value: #{e.message}", :red)
64
+ Autoproj.message("invalid value: #{e.message}", :red)
65
65
  retry
66
66
  end
67
67
 
@@ -129,7 +129,7 @@ module Autoproj
129
129
  if doc[-1, 1] != "?"
130
130
  doc = "#{doc}:"
131
131
  end
132
- Autoproj.progress " #{doc} #{value}"
132
+ Autoproj.message " #{doc} #{value}"
133
133
  @user_config[key] = [value, true]
134
134
  end
135
135
  value
@@ -69,7 +69,7 @@ module Autoproj
69
69
  def self.load_default
70
70
  file = ENV['AUTOPROJ_DEFAULT_OSDEPS'] || AUTOPROJ_OSDEPS
71
71
  if !File.file?(file)
72
- Autoproj.progress "WARN: #{file} (from AUTOPROJ_DEFAULT_OSDEPS) is not a file, falling back to #{AUTOPROJ_OSDEPS}"
72
+ Autoproj.warn "#{file} (from AUTOPROJ_DEFAULT_OSDEPS) is not a file, falling back to #{AUTOPROJ_OSDEPS}"
73
73
  file = AUTOPROJ_OSDEPS
74
74
  end
75
75
  OSDependencies.load(file)
@@ -89,7 +89,7 @@ module Autoproj
89
89
  # install RubyGems packages
90
90
  def gem_fetcher
91
91
  if !@gem_fetcher
92
- Autobuild.progress "looking for RubyGems updates"
92
+ Autoproj.message "looking for RubyGems updates"
93
93
  @gem_fetcher = Gem::SpecFetcher.fetcher
94
94
  end
95
95
  @gem_fetcher
@@ -219,7 +219,7 @@ module Autoproj
219
219
  @operating_system = [names.split(','), versions.split(',')]
220
220
  end
221
221
  else
222
- Autoproj.progress " autodetecting the operating system"
222
+ Autoproj.message " autodetecting the operating system"
223
223
  name, versions = os_from_lsb
224
224
  if name
225
225
  if name != "debian"
@@ -312,7 +312,7 @@ module Autoproj
312
312
  if package_name =~ /^(\w[a-z0-9+-.]+)/
313
313
  @dpkg_installed_packages.include?($1)
314
314
  else
315
- Autoproj.progress "WARN: #{package_name} is not a valid Debian package name"
315
+ Autoproj.warn "#{package_name} is not a valid Debian package name"
316
316
  false
317
317
  end
318
318
  end
@@ -428,7 +428,7 @@ fi
428
428
  end
429
429
  end
430
430
  if Autoproj.verbose
431
- Autoproj.progress "selected OS version #{found} for osdep #{name}: #{version_entry.inspect}"
431
+ Autoproj.message "selected OS version #{found} for osdep #{name}: #{version_entry.inspect}"
432
432
  end
433
433
 
434
434
  if !version_entry
@@ -953,17 +953,17 @@ So, what do you want ? (all, ruby, os or none)
953
953
  user_shell_script = generate_user_os_script(os_names, os_packages)
954
954
  end
955
955
  if osdeps_interaction(osdeps, os_packages, user_shell_script, silent?)
956
- Autoproj.progress " installing OS packages: #{os_packages.sort.join(", ")}"
956
+ Autoproj.message " installing OS packages: #{os_packages.sort.join(", ")}"
957
957
 
958
958
  if Autoproj.verbose
959
- Autoproj.progress "Generating installation script for non-ruby OS dependencies"
960
- Autoproj.progress shell_script
959
+ Autoproj.message "Generating installation script for non-ruby OS dependencies"
960
+ Autoproj.message shell_script
961
961
  end
962
962
 
963
963
  File.open('/tmp/autoproj_osdeps_lock', 'w') do |lock_io|
964
964
  begin
965
965
  while !lock_io.flock(File::LOCK_EX | File::LOCK_NB)
966
- Autoproj.progress " waiting for other autoproj instances to finish their osdeps installation"
966
+ Autoproj.message " waiting for other autoproj instances to finish their osdeps installation"
967
967
  sleep 5
968
968
  end
969
969
 
@@ -1005,7 +1005,7 @@ So, what do you want ? (all, ruby, os or none)
1005
1005
  end
1006
1006
 
1007
1007
  if gems_interaction(gems, cmdlines, silent?)
1008
- Autobuild.progress "installing/updating RubyGems dependencies: #{gems.map { |g| g.join(" ") }.sort.join(", ")}"
1008
+ Autoproj.message "installing/updating RubyGems dependencies: #{gems.map { |g| g.join(" ") }.sort.join(", ")}"
1009
1009
 
1010
1010
  cmdlines.each do |c|
1011
1011
  Autobuild::Subprocess.run 'autoproj', 'osdeps', *c
@@ -132,9 +132,9 @@ module Autoproj
132
132
  if shell_kind =~ /^\w+$/
133
133
  shell_file = File.join(shell_dir, "autoproj_#{shell_kind}")
134
134
  if File.exists?(shell_file)
135
- Autoproj.progress
136
- Autoproj.progress "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
137
- Autoproj.progress "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
135
+ Autoproj.message
136
+ Autoproj.message "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
137
+ Autoproj.message "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
138
138
  Autobuild.env_source_file(shell_file)
139
139
  end
140
140
  end
@@ -183,7 +183,7 @@ module Autoproj
183
183
 
184
184
  output = `ldd -r #{name} 2>&1`
185
185
  if output =~ /undefined symbol/
186
- Autoproj.progress(" WARN: #{name} has undefined symbols", :magenta)
186
+ Autoproj.message(" WARN: #{name} has undefined symbols", :magenta)
187
187
  end
188
188
  end
189
189
  end
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.7.20"
2
+ VERSION = "1.7.21.b1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
5
- prerelease:
4
+ hash: 141
5
+ prerelease: 7
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 20
10
- version: 1.7.20
9
+ - 21
10
+ - b
11
+ - 1
12
+ version: 1.7.21.b1
11
13
  platform: ruby
12
14
  authors:
13
15
  - Sylvain Joyeux
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2012-02-25 00:00:00 Z
20
+ date: 2012-03-08 00:00:00 Z
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: autobuild
@@ -186,12 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
188
  required_rubygems_version: !ruby/object:Gem::Requirement
187
189
  none: false
188
190
  requirements:
189
- - - ">="
191
+ - - ">"
190
192
  - !ruby/object:Gem::Version
191
- hash: 3
193
+ hash: 25
192
194
  segments:
193
- - 0
194
- version: "0"
195
+ - 1
196
+ - 3
197
+ - 1
198
+ version: 1.3.1
195
199
  requirements: []
196
200
 
197
201
  rubyforge_project: autobuild