autoproj 1.13.7 → 2.0.0.b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.gemtest +0 -0
  3. data/Manifest.txt +27 -21
  4. data/Rakefile +4 -6
  5. data/bin/alocate +5 -1
  6. data/bin/amake +3 -53
  7. data/bin/aup +3 -50
  8. data/bin/autoproj +3 -264
  9. data/bin/autoproj_bootstrap +294 -349
  10. data/bin/autoproj_bootstrap.in +27 -3
  11. data/lib/autoproj.rb +23 -1
  12. data/lib/autoproj/autobuild.rb +51 -89
  13. data/lib/autoproj/base.rb +0 -9
  14. data/lib/autoproj/build_option.rb +1 -3
  15. data/lib/autoproj/cli.rb +1 -0
  16. data/lib/autoproj/cli/base.rb +155 -0
  17. data/lib/autoproj/cli/bootstrap.rb +119 -0
  18. data/lib/autoproj/cli/build.rb +72 -0
  19. data/lib/autoproj/cli/cache.rb +31 -0
  20. data/lib/autoproj/cli/clean.rb +37 -0
  21. data/lib/autoproj/cli/commit.rb +41 -0
  22. data/lib/autoproj/cli/doc.rb +22 -0
  23. data/lib/autoproj/cli/envsh.rb +22 -0
  24. data/lib/autoproj/cli/inspection_tool.rb +73 -0
  25. data/lib/autoproj/cli/locate.rb +96 -0
  26. data/lib/autoproj/cli/log.rb +26 -0
  27. data/lib/autoproj/cli/main.rb +249 -0
  28. data/lib/autoproj/cli/main_test.rb +57 -0
  29. data/lib/autoproj/cli/osdeps.rb +30 -0
  30. data/lib/autoproj/cli/query.rb +43 -0
  31. data/lib/autoproj/cli/reconfigure.rb +19 -0
  32. data/lib/autoproj/cli/reset.rb +7 -32
  33. data/lib/autoproj/cli/show.rb +219 -0
  34. data/lib/autoproj/cli/snapshot.rb +1 -1
  35. data/lib/autoproj/cli/status.rb +149 -0
  36. data/lib/autoproj/cli/switch_config.rb +28 -0
  37. data/lib/autoproj/cli/tag.rb +9 -35
  38. data/lib/autoproj/cli/test.rb +34 -55
  39. data/lib/autoproj/cli/update.rb +158 -0
  40. data/lib/autoproj/cli/versions.rb +32 -69
  41. data/lib/autoproj/configuration.rb +95 -34
  42. data/lib/autoproj/default.osdeps +25 -35
  43. data/lib/autoproj/environment.rb +85 -63
  44. data/lib/autoproj/exceptions.rb +50 -0
  45. data/lib/autoproj/gitorious.rb +11 -9
  46. data/lib/autoproj/manifest.rb +199 -231
  47. data/lib/autoproj/metapackage.rb +0 -8
  48. data/lib/autoproj/ops/build.rb +1 -17
  49. data/lib/autoproj/ops/configuration.rb +92 -90
  50. data/lib/autoproj/ops/import.rb +222 -0
  51. data/lib/autoproj/ops/loader.rb +18 -8
  52. data/lib/autoproj/ops/main_config_switcher.rb +45 -73
  53. data/lib/autoproj/ops/snapshot.rb +5 -10
  54. data/lib/autoproj/ops/tools.rb +10 -44
  55. data/lib/autoproj/options.rb +35 -6
  56. data/lib/autoproj/osdeps.rb +97 -68
  57. data/lib/autoproj/package_selection.rb +39 -20
  58. data/lib/autoproj/package_set.rb +26 -24
  59. data/lib/autoproj/reporter.rb +91 -0
  60. data/lib/autoproj/system.rb +50 -149
  61. data/lib/autoproj/variable_expansion.rb +32 -6
  62. data/lib/autoproj/vcs_definition.rb +57 -17
  63. data/lib/autoproj/version.rb +1 -1
  64. data/lib/autoproj/workspace.rb +550 -0
  65. data/test/ops/test_snapshot.rb +26 -0
  66. data/test/test_package.rb +30 -0
  67. data/test/test_vcs_definition.rb +46 -0
  68. metadata +55 -50
  69. data/bin/autolocate +0 -3
  70. data/bin/autoproj-bootstrap +0 -68
  71. data/bin/autoproj-cache +0 -18
  72. data/bin/autoproj-clean +0 -13
  73. data/bin/autoproj-commit +0 -10
  74. data/bin/autoproj-create-set +0 -118
  75. data/bin/autoproj-doc +0 -28
  76. data/bin/autoproj-envsh +0 -14
  77. data/bin/autoproj-list +0 -69
  78. data/bin/autoproj-locate +0 -85
  79. data/bin/autoproj-log +0 -5
  80. data/bin/autoproj-query +0 -82
  81. data/bin/autoproj-reset +0 -13
  82. data/bin/autoproj-show +0 -192
  83. data/bin/autoproj-snapshot +0 -27
  84. data/bin/autoproj-switch-config +0 -24
  85. data/bin/autoproj-tag +0 -13
  86. data/bin/autoproj-test +0 -31
  87. data/bin/autoproj-versions +0 -20
  88. data/bin/autoproj_stress_test +0 -40
  89. data/lib/autoproj/cmdline.rb +0 -1649
@@ -74,7 +74,14 @@ module Autobuild
74
74
 
75
75
  module Subprocess
76
76
  def self.run(name, phase, *cmd)
77
- output = `'#{cmd.join("' '")}'`
77
+ if cmd.last.kind_of?(Hash)
78
+ options = cmd.pop
79
+ (options[:env] || Hash.new).each do |k, v|
80
+ ENV[k] = v
81
+ end
82
+ end
83
+
84
+ output = `#{cmd.join(" ")}`
78
85
  if $?.exitstatus != 0
79
86
  STDERR.puts "ERROR: failed to run #{cmd.join(" ")}"
80
87
  STDERR.puts "ERROR: command output is: #{output}"
@@ -85,10 +92,8 @@ module Autobuild
85
92
  end
86
93
 
87
94
  module Autoproj
88
- class InputError < RuntimeError; end
89
-
90
95
  # Definition of an autoproj option as defined by
91
- # {Configuration#configuration_option}
96
+ # {Configuration#declare}
92
97
  class BuildOption
93
98
  attr_reader :name
94
99
  attr_reader :type
@@ -205,12 +210,15 @@ module Autoproj
205
210
  attr_reader :declared_options
206
211
  # The options that have already been shown to the user
207
212
  attr_reader :displayed_options
213
+ # The path to the underlying configuration file
214
+ attr_reader :path
208
215
 
209
- def initialize
216
+ def initialize(path = nil)
210
217
  @config = Hash.new
211
218
  @overrides = Hash.new
212
219
  @declared_options = Hash.new
213
220
  @displayed_options = Hash.new
221
+ @path = path
214
222
  end
215
223
 
216
224
  # Deletes the current value for an option
@@ -249,14 +257,14 @@ module Autoproj
249
257
  end
250
258
 
251
259
  # Get the value for a given option
252
- def get(key, default_value = nil)
260
+ def get(key, *default_value)
253
261
  if overrides.has_key?(key)
254
262
  return overrides[key]
255
263
  end
256
264
 
257
265
  value, validated = config[key]
258
- if value.nil? && !declared?(key) && !default_value.nil?
259
- default_value
266
+ if value.nil? && !declared?(key) && !default_value.empty?
267
+ default_value.first
260
268
  elsif value.nil? || (declared?(key) && !validated)
261
269
  value = configure(key)
262
270
  else
@@ -332,15 +340,27 @@ module Autoproj
332
340
  end
333
341
  end
334
342
 
335
- def load(path, reconfigure = false)
336
- if h = YAML.load(File.read(path))
343
+ def load(options = Hash.new)
344
+ options = validate_options options,
345
+ path: self.path,
346
+ reconfigure: false
347
+
348
+ if h = YAML.load(File.read(options[:path]))
337
349
  h.each do |key, value|
338
- set(key, value, !reconfigure)
350
+ set(key, value, !options[:reconfigure])
339
351
  end
340
352
  end
341
353
  end
342
354
 
343
- def save(path)
355
+ def reconfigure!
356
+ new_config = Hash.new
357
+ config.each do |key, (value, user_validated)|
358
+ new_config[key] = [value, false]
359
+ end
360
+ @config = new_config
361
+ end
362
+
363
+ def save(path = self.path)
344
364
  File.open(path, "w") do |io|
345
365
  h = Hash.new
346
366
  config.each do |key, value|
@@ -367,17 +387,13 @@ module Autoproj
367
387
  end
368
388
 
369
389
  def ruby_executable
370
- @ruby_executable ||= OSDependencies.autodetect_ruby_program
371
- end
372
-
373
- # For Autoproj 2.0 forward compatibility
374
- def shell_helpers?
375
- Autoproj.shell_helpers?
376
- end
377
-
378
- # For Autoproj 2.0 forward compatibility
379
- def shell_helpers=(flag)
380
- Autoproj.shell_helpers = flag
390
+ if path = get('ruby_executable', nil)
391
+ path
392
+ else
393
+ path = OSDependencies.autodetect_ruby_program
394
+ set('ruby_executable', path, true)
395
+ path
396
+ end
381
397
  end
382
398
 
383
399
  def validate_ruby_executable
@@ -401,6 +417,14 @@ module Autoproj
401
417
  use_prerelease
402
418
  end
403
419
 
420
+ def shell_helpers?
421
+ get 'shell_helpers', true
422
+ end
423
+
424
+ def shell_helpers=(flag)
425
+ set 'shell_helpers', flag, true
426
+ end
427
+
404
428
  def apply_autobuild_configuration
405
429
  if has_value_for?('autobuild')
406
430
  params = get('autobuild')
@@ -412,11 +436,46 @@ module Autoproj
412
436
  end
413
437
  end
414
438
 
415
- def apply_autoproj_prefix
416
- if has_value_for?('prefix')
417
- Autoproj.prefix = get('prefix')
418
- else Autoproj.prefix = 'install'
419
- end
439
+ # The directory in which packages will be installed.
440
+ #
441
+ # If it is a relative path, it is relative to the root dir of the
442
+ # installation.
443
+ #
444
+ # The default is "install"
445
+ #
446
+ # @return [String]
447
+ def prefix_dir
448
+ get('prefix', 'install')
449
+ end
450
+
451
+ # Defines the temporary area in which packages should put their build
452
+ # files
453
+ #
454
+ # If absolute, it is handled as {#prefix_dir}: the package name will be
455
+ # appended to it. If relative, it is relative to the package's source
456
+ # directory
457
+ #
458
+ # The default is "build"
459
+ #
460
+ # @return [String]
461
+ def build_dir
462
+ get('build', 'build')
463
+ end
464
+
465
+ # Returns true if there should be one prefix per package
466
+ #
467
+ # The default is false (disabled)
468
+ #
469
+ # @return [Boolean]
470
+ def separate_prefixes?
471
+ get('separate_prefixes', false)
472
+ end
473
+
474
+ # Controls whether there should be one prefix per package
475
+ #
476
+ # @see separate_prefixes?
477
+ def separate_prefixes=(flag)
478
+ set('separate_prefixes', flag, true)
420
479
  end
421
480
 
422
481
  # Returns true if packages and prefixes should be auto-generated, based
@@ -483,17 +542,17 @@ module Autoproj
483
542
  set("#{utility_key(utility)}_default", true)
484
543
  end
485
544
 
486
- # Enables a utility for a specific package
487
- #
488
- # Note that if the default for this utility is to be enabled, this is
489
- # essentially a no-op.
545
+ # Enables a utility for a set of packages
490
546
  #
491
547
  # @param [String] utility the utility name (e.g. 'doc' or 'test')
492
- # @param [String] package the package name
548
+ # @param [String] packages the package names
493
549
  # @return [void]
494
- def utility_enable_for(utility, package)
550
+ def utility_enable(utility, *packages)
495
551
  utility_config = get(utility_key(utility), Hash.new)
496
- set(utility_key(utility), utility_config.merge(package => true))
552
+ packages.each do |pkg_name|
553
+ utility_config[pkg_name] = true
554
+ end
555
+ set(utility_key(utility), utility_config)
497
556
  end
498
557
 
499
558
  # Disables a utility for all packages
@@ -515,11 +574,18 @@ module Autoproj
515
574
  # essentially a no-op.
516
575
  #
517
576
  # @param [String] utility the utility name (e.g. 'doc' or 'test')
518
- # @param [String] package the package name
577
+ # @param [String] packages the package names
519
578
  # @return [void]
520
- def utility_disable_for(utility, package)
579
+ def utility_disable(utility, *packages)
521
580
  utility_config = get(utility_key(utility), Hash.new)
522
- set(utility_key(utility), utility_config.merge(package => false))
581
+ packages.each do |pkg_name|
582
+ utility_config[pkg_name] = false
583
+ end
584
+ set(utility_key(utility), utility_config)
585
+ end
586
+
587
+ def merge(conf)
588
+ config.merge!(conf.config)
523
589
  end
524
590
  end
525
591
  end
@@ -565,10 +631,6 @@ module Autoproj
565
631
  @silent = true
566
632
  end
567
633
 
568
- def parse_package_entry(entry)
569
- entry
570
- end
571
-
572
634
  # The primary name for this package manager
573
635
  def name
574
636
  names.first
@@ -578,7 +640,7 @@ module Autoproj
578
640
  # order to have a properly functioning package manager
579
641
  #
580
642
  # This is e.g. needed for python pip or rubygems
581
- def self.initialize_environment
643
+ def self.initialize_environment(_env = nil, _manifest = nil, _root_dir = Autoproj.root_dir)
582
644
  end
583
645
  end
584
646
 
@@ -843,7 +905,7 @@ fi
843
905
  false)
844
906
  end
845
907
 
846
- def filter_uptodate_packages(packages)
908
+ def filter_uptodate_packages(packages, options = Hash.new)
847
909
  # TODO there might be duplicates in packages which should be fixed
848
910
  # somewhere else
849
911
  packages = packages.uniq
@@ -910,7 +972,7 @@ fi
910
972
  "zypper -n install '%s'")
911
973
  end
912
974
 
913
- def filter_uptodate_packages(packages)
975
+ def filter_uptodate_packages(packages, options = Hash.new)
914
976
  result = `LANG=C rpm -q --whatprovides '#{packages.join("' '")}'`
915
977
  has_all_pkgs = $?.success?
916
978
 
@@ -949,7 +1011,7 @@ fi
949
1011
  "yum install -y '%s'")
950
1012
  end
951
1013
 
952
- def filter_uptodate_packages(packages)
1014
+ def filter_uptodate_packages(packages, options = Hash.new)
953
1015
  result = `LANG=C rpm -q --queryformat "%{NAME}\n" '#{packages.join("' '")}'`
954
1016
 
955
1017
  installed_packages = []
@@ -1052,7 +1114,7 @@ fi
1052
1114
  end
1053
1115
  end
1054
1116
 
1055
- def filter_uptodate_packages(packages)
1117
+ def filter_uptodate_packages(packages, options = Hash.new)
1056
1118
  packages.find_all do |package_name|
1057
1119
  !installed?(package_name)
1058
1120
  end
@@ -1062,43 +1124,65 @@ fi
1062
1124
  # Package manager interface for the RubyGems system
1063
1125
  class GemManager < Manager
1064
1126
  class << self
1065
- attr_accessor :with_prerelease
1127
+ attr_writer :with_prerelease
1066
1128
  attr_accessor :with_doc
1067
1129
  end
1068
1130
  @with_prerelease = false
1069
1131
  @with_doc = false
1070
1132
 
1133
+ def self.with_prerelease(*value)
1134
+ if value.empty?
1135
+ @with_prerelease
1136
+ else
1137
+ begin
1138
+ saved_flag = @with_prerelease
1139
+ @with_prerelease = value.first
1140
+ yield
1141
+ ensure
1142
+ @with_prerelease = saved_flag
1143
+ end
1144
+ end
1145
+ end
1146
+
1071
1147
  # Filters all paths that come from other autoproj installations out
1072
1148
  # of GEM_PATH
1073
- def self.initialize_environment
1074
- Autobuild::ORIGINAL_ENV['GEM_PATH'] =
1075
- (ENV['GEM_PATH'] || "").split(File::PATH_SEPARATOR).find_all do |p|
1149
+ def self.initialize_environment(env = Autobuild.env, manifest = Autoproj.manifest, root_dir = Autoproj.root_dir)
1150
+ env.original_env['GEM_PATH'] =
1151
+ (env['GEM_PATH'] || "").split(File::PATH_SEPARATOR).find_all do |p|
1076
1152
  !Autoproj.in_autoproj_installation?(p)
1077
1153
  end.join(File::PATH_SEPARATOR)
1078
- Autobuild.env_inherit 'GEM_PATH'
1079
- Autobuild.env_init_from_env 'GEM_PATH'
1154
+ env.inherit 'GEM_PATH'
1155
+ env.init_from_env 'GEM_PATH'
1080
1156
 
1081
- orig_gem_path = Autobuild::ORIGINAL_ENV['GEM_PATH'].split(File::PATH_SEPARATOR)
1082
- Autobuild::SYSTEM_ENV['GEM_PATH'] = Gem.default_path
1083
- Autobuild::ORIGINAL_ENV['GEM_PATH'] = orig_gem_path.join(File::PATH_SEPARATOR)
1157
+ orig_gem_path = env.original_env['GEM_PATH'].split(File::PATH_SEPARATOR)
1158
+ env.system_env['GEM_PATH'] = Gem.default_path
1159
+ env.original_env['GEM_PATH'] = orig_gem_path.join(File::PATH_SEPARATOR)
1084
1160
 
1085
- Autoproj.manifest.each_reused_autoproj_installation do |p|
1161
+ manifest.each_reused_autoproj_installation do |p|
1086
1162
  p_gems = File.join(p, '.gems')
1087
1163
  if File.directory?(p_gems)
1088
- Autobuild.env_push_path 'GEM_PATH', p_gems
1089
- Autobuild.env_push_path 'PATH', File.join(p_gems, 'bin')
1164
+ env.push_path 'GEM_PATH', p_gems
1165
+ env.push_path 'PATH', File.join(p_gems, 'bin')
1090
1166
  end
1091
1167
  end
1092
- Autobuild.env_push_path 'GEM_PATH', gem_home
1093
- Autobuild.env_set 'GEM_HOME', gem_home
1094
- Autobuild.env_push_path 'PATH', "#{gem_home}/bin"
1168
+
1169
+ @gem_home = (ENV['AUTOPROJ_GEM_HOME'] || File.join(root_dir, ".gems"))
1170
+ env.push_path 'GEM_PATH', gem_home
1171
+ env.set 'GEM_HOME', gem_home
1172
+ env.push_path 'PATH', "#{gem_home}/bin"
1095
1173
 
1096
1174
  # Now, reset the directories in our own RubyGems instance
1097
- Gem.paths = ENV
1175
+ Gem.paths = env.resolved_env
1098
1176
 
1099
1177
  use_cache_dir
1100
1178
  end
1101
1179
 
1180
+ # Override the gem home detected by {initialize_environment}, or set
1181
+ # it in cases where calling {initialize_environment} is not possible
1182
+ def self.gem_home=(gem_home)
1183
+ @gem_home = gem_home
1184
+ end
1185
+
1102
1186
  # A global cache directory that should be used to avoid
1103
1187
  # re-downloading gems
1104
1188
  def self.cache_dir
@@ -1124,7 +1208,7 @@ fi
1124
1208
 
1125
1209
  # Return the directory in which RubyGems package should be installed
1126
1210
  def self.gem_home
1127
- ENV['AUTOPROJ_GEM_HOME'] || File.join(Autoproj.root_dir, ".gems")
1211
+ @gem_home
1128
1212
  end
1129
1213
 
1130
1214
  # Returns the set of default options that are added to gem
@@ -1218,7 +1302,9 @@ fi
1218
1302
  Autoproj.message " installing/updating RubyGems dependencies: #{gems.map { |g| g.join(" ") }.sort.join(", ")}"
1219
1303
 
1220
1304
  cmdlines.each do |c|
1221
- Autobuild::Subprocess.run 'autoproj', 'osdeps', *c
1305
+ Autobuild::Subprocess.run 'autoproj', 'osdeps', *c,
1306
+ env: Hash['GEM_HOME' => Gem.paths.home,
1307
+ 'GEM_PATH' => Gem.paths.path.join(":")]
1222
1308
  end
1223
1309
  gems.each do |name, v|
1224
1310
  installed_gems << name
@@ -1229,7 +1315,10 @@ fi
1229
1315
 
1230
1316
  # Returns the set of RubyGem packages in +packages+ that are not already
1231
1317
  # installed, or that can be upgraded
1232
- def filter_uptodate_packages(gems)
1318
+ def filter_uptodate_packages(gems, options = Hash.new)
1319
+ options = validate_options options,
1320
+ install_only: !Autobuild.do_update
1321
+
1233
1322
  # Don't install gems that are already there ...
1234
1323
  gems = gems.dup
1235
1324
  gems.delete_if do |name, version|
@@ -1247,7 +1336,7 @@ fi
1247
1336
  Gem.source_index.find_name(name, version_requirements)
1248
1337
  end
1249
1338
 
1250
- if !installed.empty? && Autobuild.do_update
1339
+ if !installed.empty? && !options[:install_only]
1251
1340
  # Look if we can update the package ...
1252
1341
  dep = Gem::Dependency.new(name, version_requirements)
1253
1342
  available =
@@ -1336,14 +1425,14 @@ fi
1336
1425
 
1337
1426
  attr_reader :installed_gems
1338
1427
 
1339
- def self.initialize_environment
1340
- Autoproj.env_set 'PYTHONUSERBASE', pip_home
1428
+ def self.initialize_environment(env = Autobuild.env, _manifest = nil, root_dir = Autoproj.root_dir)
1429
+ env.set 'PYTHONUSERBASE', pip_home(env, root_dir)
1341
1430
  end
1342
1431
 
1343
1432
  # Return the directory where python packages are installed to.
1344
1433
  # The actual path is pip_home/lib/pythonx.y/site-packages.
1345
- def self.pip_home
1346
- ENV['AUTOPROJ_PYTHONUSERBASE'] || File.join(Autoproj.root_dir,".pip")
1434
+ def self.pip_home(env = Autobuild.env, root_dir = Autobuild.root_dir)
1435
+ env['AUTOPROJ_PYTHONUSERBASE'] || File.join(root_dir,".pip")
1347
1436
  end
1348
1437
 
1349
1438
 
@@ -1789,12 +1878,8 @@ fi
1789
1878
  # Validate the options. We check on the availability of
1790
1879
  # validate_options as to not break autoproj_bootstrap (in which
1791
1880
  # validate_options is not available)
1792
- options =
1793
- if Kernel.respond_to?(:validate_options)
1794
- Kernel.validate_options options, :force => false
1795
- else
1796
- options.dup
1797
- end
1881
+ options = validate_options options, force: false, config: Autoproj.config
1882
+ config = options.fetch(:config)
1798
1883
 
1799
1884
  if user_os = ENV['AUTOPROJ_OS']
1800
1885
  @operating_system =
@@ -1811,8 +1896,8 @@ fi
1811
1896
  @operating_system = nil
1812
1897
  elsif !@operating_system.nil? # @operating_system can be set to false to simulate an unknown OS
1813
1898
  return @operating_system
1814
- elsif Autoproj.has_config_key?('operating_system')
1815
- os = Autoproj.user_config('operating_system')
1899
+ elsif config.has_value_for?('operating_system')
1900
+ os = config.get('operating_system')
1816
1901
  if os.respond_to?(:to_ary)
1817
1902
  if os[0].respond_to?(:to_ary) && os[0].all? { |s| s.respond_to?(:to_str) } &&
1818
1903
  os[1].respond_to?(:to_ary) && os[1].all? { |s| s.respond_to?(:to_str) }
@@ -1851,7 +1936,7 @@ fi
1851
1936
  names, versions = normalize_os_representation(names, versions)
1852
1937
 
1853
1938
  @operating_system = [names, versions]
1854
- Autoproj.change_option('operating_system', @operating_system, true)
1939
+ config.set('operating_system', @operating_system, true)
1855
1940
  Autobuild.progress :operating_system_autodetection, "operating system: #{(names - ['default']).join(",")} - #{(versions - ['default']).join(",")}"
1856
1941
  @operating_system
1857
1942
  ensure
@@ -1978,15 +2063,11 @@ fi
1978
2063
  end
1979
2064
 
1980
2065
  result.map do |handler, status, entries|
1981
- entries = entries.map do |e|
1982
- if e.respond_to?(:to_str)
1983
- handler.parse_package_entry(e)
1984
- else
1985
- e
1986
- end
2066
+ if handler.respond_to?(:parse_package_entry)
2067
+ [handler, status, entries.map { |s| handler.parse_package_entry(s) }]
2068
+ else
2069
+ [handler, status, entries]
1987
2070
  end
1988
-
1989
- [handler, status, entries]
1990
2071
  end
1991
2072
  end
1992
2073
 
@@ -2136,8 +2217,6 @@ fi
2136
2217
  return found, result
2137
2218
  end
2138
2219
 
2139
- class MissingOSDep < ConfigError; end
2140
-
2141
2220
  # Resolves the given OS dependencies into the actual packages that need
2142
2221
  # to be installed on this particular OS.
2143
2222
  #
@@ -2255,7 +2334,7 @@ fi
2255
2334
  HANDLE_OS = 'os'
2256
2335
  HANDLE_NONE = 'none'
2257
2336
 
2258
- def self.osdeps_mode_option_unsupported_os
2337
+ def self.osdeps_mode_option_unsupported_os(config = Autoproj.config)
2259
2338
  long_doc =<<-EOT
2260
2339
  The software packages that autoproj will have to build may require other
2261
2340
  prepackaged softwares (a.k.a. OS dependencies) to be installed (RubyGems
@@ -2286,13 +2365,13 @@ So, what do you want ? (all, none or a comma-separated list of: gem pip)
2286
2365
  EOT
2287
2366
  message = [ "Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (all, none or a comma-separated list of: gem pip) ?", long_doc.strip ]
2288
2367
 
2289
- Autoproj.configuration_option 'osdeps_mode', 'string',
2368
+ config.declare 'osdeps_mode', 'string',
2290
2369
  :default => 'ruby',
2291
2370
  :doc => message,
2292
2371
  :lowercase => true
2293
2372
  end
2294
2373
 
2295
- def self.osdeps_mode_option_supported_os
2374
+ def self.osdeps_mode_option_supported_os(config = Autoproj.config)
2296
2375
  long_doc =<<-EOT
2297
2376
  The software packages that autoproj will have to build may require other
2298
2377
  prepackaged softwares (a.k.a. OS dependencies) to be installed (RubyGems
@@ -2327,17 +2406,17 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2327
2406
  EOT
2328
2407
  message = [ "Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (all, none or a comma-separated list of: os gem pip) ?", long_doc.strip ]
2329
2408
 
2330
- Autoproj.configuration_option 'osdeps_mode', 'string',
2409
+ config.declare 'osdeps_mode', 'string',
2331
2410
  :default => 'all',
2332
2411
  :doc => message,
2333
2412
  :lowercase => true
2334
2413
  end
2335
2414
 
2336
- def self.define_osdeps_mode_option
2415
+ def self.define_osdeps_mode_option(config = Autoproj.config)
2337
2416
  if supported_operating_system?
2338
- osdeps_mode_option_supported_os
2417
+ osdeps_mode_option_supported_os(config)
2339
2418
  else
2340
- osdeps_mode_option_unsupported_os
2419
+ osdeps_mode_option_unsupported_os(config)
2341
2420
  end
2342
2421
  end
2343
2422
 
@@ -2389,10 +2468,10 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2389
2468
  @osdeps_mode = OSDependencies.osdeps_mode
2390
2469
  end
2391
2470
 
2392
- def self.osdeps_mode
2471
+ def self.osdeps_mode(config = Autoproj.config)
2393
2472
  while true
2394
2473
  mode =
2395
- if !Autoproj.has_config_key?('osdeps_mode') &&
2474
+ if !config.has_value_for?('osdeps_mode') &&
2396
2475
  mode_name = ENV['AUTOPROJ_OSDEPS_MODE']
2397
2476
  begin OSDependencies.osdeps_mode_string_to_value(mode_name)
2398
2477
  rescue ArgumentError
@@ -2400,7 +2479,7 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2400
2479
  nil
2401
2480
  end
2402
2481
  else
2403
- mode_name = Autoproj.user_config('osdeps_mode')
2482
+ mode_name = config.get('osdeps_mode')
2404
2483
  begin OSDependencies.osdeps_mode_string_to_value(mode_name)
2405
2484
  rescue ArgumentError
2406
2485
  Autoproj.warn "invalid osdeps mode stored in configuration file"
@@ -2410,12 +2489,12 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2410
2489
 
2411
2490
  if mode
2412
2491
  @osdeps_mode = mode
2413
- Autoproj.change_option('osdeps_mode', mode_name, true)
2492
+ config.set('osdeps_mode', mode_name, true)
2414
2493
  return mode
2415
2494
  end
2416
2495
 
2417
2496
  # Invalid configuration values. Retry
2418
- Autoproj.reset_option('osdeps_mode')
2497
+ config.reset('osdeps_mode')
2419
2498
  ENV['AUTOPROJ_OSDEPS_MODE'] = nil
2420
2499
  end
2421
2500
  end
@@ -2437,7 +2516,8 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2437
2516
  def setup_package_handlers(options = Hash.new)
2438
2517
  options =
2439
2518
  if Kernel.respond_to?(:validate_options)
2440
- Kernel.validate_options options, :osdeps_mode => osdeps_mode
2519
+ Kernel.validate_options options,
2520
+ osdeps_mode: osdeps_mode
2441
2521
  else
2442
2522
  options = options.dup
2443
2523
  options[:osdeps_mode] ||= osdeps_mode
@@ -2480,7 +2560,7 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2480
2560
  # This is usually called as a rebuild step to make sure that all these
2481
2561
  # packages are updated to whatever required the rebuild
2482
2562
  def pristine(packages, options = Hash.new)
2483
- setup_package_handlers(options)
2563
+ install(packages, options.merge(install_only: true))
2484
2564
  packages = resolve_os_dependencies(packages)
2485
2565
 
2486
2566
  _, other_packages =
@@ -2498,12 +2578,16 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2498
2578
  packages = packages.to_set - installed_packages
2499
2579
  return false if packages.empty?
2500
2580
 
2581
+ filter_options, options =
2582
+ filter_options options, install_only: !Autobuild.do_update
2501
2583
  setup_package_handlers(options)
2502
2584
 
2503
2585
  packages = resolve_os_dependencies(packages)
2586
+
2587
+ needs_filter = (filter_uptodate_packages? || filter_options[:install_only])
2504
2588
  packages = packages.map do |handler, list|
2505
- if filter_uptodate_packages? && handler.respond_to?(:filter_uptodate_packages)
2506
- list = handler.filter_uptodate_packages(list)
2589
+ if needs_filter && handler.respond_to?(:filter_uptodate_packages)
2590
+ list = handler.filter_uptodate_packages(list, filter_options)
2507
2591
  end
2508
2592
 
2509
2593
  if !list.empty?
@@ -2523,6 +2607,17 @@ So, what do you want ? (all, none or a comma-separated list of: os gem pip)
2523
2607
  end
2524
2608
  true
2525
2609
  end
2610
+
2611
+ def reinstall(options = Hash.new)
2612
+ # We also reinstall the osdeps that provide the
2613
+ # functionality
2614
+ managers = setup_package_handlers(options)
2615
+ managers.each do |mng|
2616
+ if mng.enabled? && mng.respond_to?(:reinstall)
2617
+ mng.reinstall
2618
+ end
2619
+ end
2620
+ end
2526
2621
  end
2527
2622
  end
2528
2623
 
@@ -2595,68 +2690,6 @@ end
2595
2690
 
2596
2691
 
2597
2692
  module Autoproj
2598
- # @deprecated use config.override instead
2599
- def self.override_option(option_name, value)
2600
- config.override(option_name, value)
2601
- end
2602
- # @deprecated use config.reset instead
2603
- def self.reset_option(key)
2604
- config.reset(key)
2605
- end
2606
- # @deprecated use config.set(key, value, user_validated) instead
2607
- def self.change_option(key, value, user_validated = false)
2608
- config.set(key, value, user_validated)
2609
- end
2610
- # @deprecated use config.validated_values instead
2611
- def self.option_set
2612
- config.validated_values
2613
- end
2614
- # @deprecated use config.get(key) instead
2615
- def self.user_config(key)
2616
- config.get(key)
2617
- end
2618
- # @deprecated use config.declare(name, type, options, &validator) instead
2619
- def self.configuration_option(name, type, options, &validator)
2620
- config.declare(name, type, options, &validator)
2621
- end
2622
- # @deprecated use config.declared?(name, type, options, &validator) instead
2623
- def self.declared_option?(name)
2624
- config.declared?(name)
2625
- end
2626
- # @deprecated use config.configure(option_name) instead
2627
- def self.configure(option_name)
2628
- config.configure(option_name)
2629
- end
2630
- # @deprecated use config.has_value_for?(name)
2631
- def self.has_config_key?(name)
2632
- config.has_value_for?(name)
2633
- end
2634
-
2635
- def self.save_config
2636
- config.save(File.join(Autoproj.config_dir, "config.yml"))
2637
- end
2638
-
2639
- def self.config
2640
- @config ||= Configuration.new
2641
- end
2642
-
2643
- def self.load_config
2644
- config_file = File.join(Autoproj.config_dir, "config.yml")
2645
- if File.exists?(config_file)
2646
- config.load(config_file, reconfigure?)
2647
- end
2648
- end
2649
-
2650
- class << self
2651
- attr_accessor :reconfigure
2652
- end
2653
- def self.reconfigure?; @reconfigure end
2654
- end
2655
-
2656
-
2657
- module Autoproj
2658
- class UserError < RuntimeError; end
2659
-
2660
2693
  # OS-independent creation of symbolic links. Note that on windows, it only
2661
2694
  # works for directories
2662
2695
  def self.create_symlink(from, to)
@@ -2680,6 +2713,9 @@ module Autoproj
2680
2713
  # This is mostly useful during bootstrapping (i.e. when the search would
2681
2714
  # fail)
2682
2715
  def self.root_dir=(dir)
2716
+ if @workspace && dir != @workspace.root_dir
2717
+ raise WorkspaceAlreadyCreated, "cannot switch global root directory after a workspace object got created"
2718
+ end
2683
2719
  @root_dir = dir
2684
2720
  end
2685
2721
 
@@ -2691,90 +2727,77 @@ module Autoproj
2691
2727
  if @root_dir
2692
2728
  return @root_dir
2693
2729
  end
2694
-
2695
- path = Pathname.pwd
2696
- while !path.root?
2697
- if (path + "autoproj" + 'manifest').file?
2698
- break
2699
- end
2700
- path = path.parent
2701
- end
2702
-
2703
- if path.root?
2730
+ path = Workspace.find_root_dir(dir)
2731
+ if !path
2704
2732
  raise UserError, "not in a Autoproj installation"
2705
2733
  end
2706
-
2707
- result = path.to_s
2708
- # I don't know if this is still useful or not ... but it does not hurt
2709
- #
2710
- # Preventing backslashed in path, that might be confusing on some path compares
2711
- if Autobuild.windows?
2712
- result = result.gsub(/\\/,'/')
2713
- end
2714
- result
2734
+ path
2715
2735
  end
2716
2736
 
2717
- # Returns the configuration directory for this autoproj installation.
2718
- #
2719
- # If the current directory is not in an autoproj installation,
2720
- # raises UserError.
2737
+ # @deprecated use workspace.config_dir instead
2721
2738
  def self.config_dir
2722
- File.join(root_dir, "autoproj")
2739
+ Autoproj.warn "#{__method__} is deprecated, use workspace.config_dir instead"
2740
+ caller.each { |l| Autoproj.warn " #{l}" }
2741
+ workspace.config_dir
2723
2742
  end
2724
-
2725
- OVERRIDES_DIR = "overrides.d"
2726
-
2727
- # Returns the directory containing overrides files
2728
- #
2729
- # If the current directory is not in an autoproj installation,
2730
- # raises UserError.
2743
+ # @deprecated use workspace.overrides_dir instead
2731
2744
  def self.overrides_dir
2732
- File.join(config_dir, OVERRIDES_DIR)
2745
+ Autoproj.warn "#{__method__} is deprecated, use workspace.overrides_dir instead"
2746
+ caller.each { |l| Autoproj.warn " #{l}" }
2747
+ workspace.overrides_dir
2733
2748
  end
2734
-
2735
2749
  # @deprecated use Autobuild.find_in_path instead
2736
2750
  #
2737
2751
  # Warning: the autobuild method returns nil (instead of raising) if the
2738
2752
  # argument cannot be found
2739
2753
  def self.find_in_path(name)
2754
+ Autoproj.warn "#{__method__} is deprecated, use Autobuild.find_in_path instead"
2755
+ caller.each { |l| Autoproj.warn " #{l}" }
2740
2756
  if path = Autobuild.find_in_path(name)
2741
2757
  return path
2742
2758
  else raise ArgumentError, "cannot find #{name} in PATH (#{ENV['PATH']})"
2743
2759
  end
2744
2760
  end
2745
-
2746
- class << self
2747
- # The directory in which packages will be installed.
2748
- #
2749
- # If it is a relative path, it is relative to the root dir of the
2750
- # installation.
2751
- #
2752
- # The default is "install"
2753
- attr_reader :prefix
2754
-
2755
- # Change the value of 'prefix'
2756
- def prefix=(new_path)
2757
- @prefix = new_path
2758
- Autoproj.change_option('prefix', new_path, true)
2759
- end
2761
+ # @deprecated use workspace.prefix_dir instead
2762
+ def self.prefix
2763
+ Autoproj.warn_deprecated(__method__, 'workspace.prefix_dir')
2764
+ workspace.prefix_dir
2760
2765
  end
2761
- @prefix = "install"
2762
-
2763
- # Returns the build directory (prefix) for this autoproj installation.
2764
- #
2765
- # If the current directory is not in an autoproj installation, raises
2766
- # UserError.
2766
+ # @deprecated use workspace.prefix_dir= instead
2767
+ def self.prefix=(path)
2768
+ Autoproj.warn_deprecated(__method__, 'workspace.prefix_dir=')
2769
+ workspace.prefix_dir = path
2770
+ end
2771
+ # @deprecated use workspace.prefix_dir instead
2767
2772
  def self.build_dir
2768
- File.expand_path(Autoproj.prefix, root_dir)
2773
+ Autoproj.warn_deprecated(__method__, 'workspace.prefix_dir')
2774
+ workspace.prefix_dir
2769
2775
  end
2770
-
2771
- # Returns the path to the provided configuration file.
2772
- #
2773
- # If the current directory is not in an autoproj installation, raises
2774
- # UserError.
2776
+ # @deprecated compute the full path with File.join(config_dir, file)
2777
+ # directly instead
2775
2778
  def self.config_file(file)
2779
+ Autoproj.warn_deprecated(__method__, 'compute the full path with File.join(config_dir, ...) instead')
2776
2780
  File.join(config_dir, file)
2777
2781
  end
2782
+ # @deprecated use workspace.remotes_dir instead
2783
+ def self.remotes_dir
2784
+ Autoproj.warn_deprecated(__method__, 'use workspace.remotes_dir instead')
2785
+ workspace.remotes_dir
2786
+ end
2787
+ # @deprecated use workspace.load or add a separate Loader object to your class
2788
+ def self.load(package_set, *path)
2789
+ Autoproj.warn_deprecated(
2790
+ __method__,
2791
+ 'use workspace.load or add a separate Loader object to your class')
2792
+ workspace.load(package_set, *path)
2793
+ end
2794
+ # @deprecated use workspace.load_if_present or add a separate Loader object to your class
2795
+ def self.load_if_present(package_set, *path)
2796
+ Autoproj.warn_deprecated(
2797
+ __method__,
2798
+ 'use workspace.load_if_present or add a separate Loader object to your class')
2799
+ workspace.load_if_present(package_set, *path)
2800
+ end
2778
2801
 
2779
2802
  # Run the provided command as user
2780
2803
  def self.run_as_user(*args)
@@ -2782,7 +2805,6 @@ module Autoproj
2782
2805
  raise "failed to run #{args.join(" ")}"
2783
2806
  end
2784
2807
  end
2785
-
2786
2808
  # Run the provided command as root, using sudo to gain root access
2787
2809
  def self.run_as_root(*args)
2788
2810
  if !system(Autobuild.tool_in_path('sudo'), *args)
@@ -2790,92 +2812,6 @@ module Autoproj
2790
2812
  end
2791
2813
  end
2792
2814
 
2793
- # Return the directory in which remote package set definition should be
2794
- # checked out
2795
- def self.remotes_dir
2796
- File.join(root_dir, ".remotes")
2797
- end
2798
-
2799
-
2800
- def self.env_inherit(*names)
2801
- Autobuild.env_inherit(*names)
2802
- end
2803
-
2804
- # @deprecated use isolate_environment instead
2805
- def self.set_initial_env
2806
- isolate_environment
2807
- end
2808
-
2809
- # Initializes the environment variables to a "sane default"
2810
- #
2811
- # Use this in autoproj/init.rb to make sure that the environment will not
2812
- # get polluted during the build.
2813
- def self.isolate_environment
2814
- Autobuild.env_inherit = false
2815
- Autobuild.env_push_path 'PATH', "/usr/local/bin", "/usr/bin", "/bin"
2816
- end
2817
-
2818
- def self.prepare_environment
2819
- # Set up some important autobuild parameters
2820
- env_inherit 'PATH', 'PKG_CONFIG_PATH', 'RUBYLIB', \
2821
- 'LD_LIBRARY_PATH', 'CMAKE_PREFIX_PATH', 'PYTHONPATH'
2822
-
2823
- env_set 'AUTOPROJ_CURRENT_ROOT', Autoproj.root_dir
2824
- env_set 'RUBYOPT', "-rubygems"
2825
- Autoproj::OSDependencies::PACKAGE_HANDLERS.each do |pkg_mng|
2826
- pkg_mng.initialize_environment
2827
- end
2828
- end
2829
-
2830
- class << self
2831
- attr_writer :shell_helpers
2832
- def shell_helpers?; !!@shell_helpers end
2833
- end
2834
- @shell_helpers = true
2835
-
2836
- # Create the env.sh script in +subdir+. In general, +subdir+ should be nil.
2837
- def self.export_env_sh(subdir = nil)
2838
- # Make sure that we have as much environment as possible
2839
- Autoproj::CmdLine.update_environment
2840
-
2841
- filename = if subdir
2842
- File.join(Autoproj.root_dir, subdir, ENV_FILENAME)
2843
- else
2844
- File.join(Autoproj.root_dir, ENV_FILENAME)
2845
- end
2846
-
2847
- shell_dir = File.expand_path(File.join("..", "..", "shell"), File.dirname(__FILE__))
2848
- if Autoproj.shell_helpers?
2849
- Autoproj.message "sourcing autoproj shell helpers"
2850
- Autoproj.message "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
2851
- Autobuild.env_source_after(File.join(shell_dir, "autoproj_sh"))
2852
- end
2853
-
2854
- File.open(filename, "w") do |io|
2855
- if Autobuild.env_inherit
2856
- io.write <<-EOF
2857
- if test -n "$AUTOPROJ_CURRENT_ROOT" && test "$AUTOPROJ_CURRENT_ROOT" != "#{Autoproj.root_dir}"; then
2858
- echo "the env.sh from $AUTOPROJ_CURRENT_ROOT is already loaded. Start a new shell before sourcing this one"
2859
- return
2860
- fi
2861
- EOF
2862
- end
2863
- Autobuild.export_env_sh(io)
2864
- end
2865
- end
2866
-
2867
- # @deprecated use Ops.loader.load or add a proper Loader object to your
2868
- # class
2869
- def self.load(package_set, *path)
2870
- Ops.loader.load(package_set, *path)
2871
- end
2872
-
2873
- # @deprecated use Ops.loader.load_if_present or add a proper Loader object
2874
- # to your class
2875
- def self.load_if_present(package_set, *path)
2876
- Ops.loader.load_if_present(package_set, *path)
2877
- end
2878
-
2879
2815
  # Look into +dir+, searching for shared libraries. For each library, display
2880
2816
  # a warning message if this library has undefined symbols.
2881
2817
  def self.validate_solib_dependencies(dir, exclude_paths = [])
@@ -2897,6 +2833,12 @@ DEFS = <<EODEFS
2897
2833
  ---
2898
2834
  none: ignore
2899
2835
  ruby19:
2836
+ debian:
2837
+ - ruby1.9.1
2838
+ - ruby1.9.1-dev
2839
+ - rubygems1.9.1
2840
+ - rake
2841
+ - rubygems-integration
2900
2842
  ubuntu:
2901
2843
  '12.04':
2902
2844
  - ruby1.9.1
@@ -2905,7 +2847,17 @@ ruby19:
2905
2847
  - ri1.9.1
2906
2848
  - libopenssl-ruby1.9.1
2907
2849
  - rake
2908
- default: ignore
2850
+ default:
2851
+ - ruby1.9.1
2852
+ - ruby1.9.1-dev
2853
+ - rubygems1.9.1
2854
+ - ri1.9.1
2855
+ - libopenssl-ruby1.9.1
2856
+ - rake
2857
+ - rubygems-integration
2858
+ gentoo:
2859
+ - dev-lang/ruby:1.9
2860
+ - rake
2909
2861
  fedora:
2910
2862
  '17':
2911
2863
  - ruby
@@ -2940,13 +2892,12 @@ ruby20:
2940
2892
  default: ignore
2941
2893
  ruby21:
2942
2894
  debian:
2943
- jessie:
2944
- - ruby2.1
2945
- - ruby2.1-dev
2946
- - rake
2947
- - rubygems-integration
2895
+ - ruby2.1
2896
+ - ruby2.1-dev
2897
+ - rake
2898
+ - rubygems-integration
2948
2899
  ubuntu:
2949
- 14.10,15.04,15.10:
2900
+ '14.10':
2950
2901
  - ruby2.1
2951
2902
  - ruby2.1-dev
2952
2903
  - rake
@@ -2956,29 +2907,6 @@ ruby21:
2956
2907
  macos-brew:
2957
2908
  - gem: rake
2958
2909
  default: ignore
2959
- ruby22:
2960
- ubuntu:
2961
- '15.10':
2962
- - ruby2.2
2963
- - ruby2.2-dev
2964
- - rake
2965
- - rubygems-integration
2966
- default: ignore
2967
- default: ignore
2968
- ruby23:
2969
- debian:
2970
- unstable:
2971
- - ruby2.3
2972
- - ruby2.3-dev
2973
- - rake
2974
- - rubygems-integration
2975
- ubuntu:
2976
- '16.04':
2977
- - ruby2.3-dev
2978
- - rake
2979
- - rubygems-integration
2980
- default: ignore
2981
- default: ignore
2982
2910
  build-essential:
2983
2911
  debian,ubuntu: build-essential
2984
2912
  gentoo: ignore
@@ -2993,10 +2921,10 @@ build-essential:
2993
2921
  - gcc-c++
2994
2922
  default: clang
2995
2923
  autobuild:
2996
- - gem: autobuild~>1.9.0
2924
+ - gem: autobuild
2997
2925
  - osdep: readline
2998
2926
  autoproj:
2999
- - gem: autoproj~>1.13.0
2927
+ - gem: autoproj
3000
2928
  - osdep: readline
3001
2929
  readline:
3002
2930
  debian,ubuntu: libreadline-dev
@@ -3099,7 +3027,6 @@ pip:
3099
3027
  fedora: python-pip
3100
3028
  freebsd: pip
3101
3029
  sudo:
3102
- macos-brew: ignore
3103
3030
  default: sudo
3104
3031
 
3105
3032
  EODEFS
@@ -3151,6 +3078,24 @@ if !curdir_entries.empty? && ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] != '1
3151
3078
  end
3152
3079
  end
3153
3080
 
3081
+ # While in here, we don't have utilrb
3082
+ module Kernel
3083
+ def filter_options(options, defaults)
3084
+ options = options.dup
3085
+ filtered = Hash.new
3086
+ defaults.each do |k, v|
3087
+ filtered[k] =
3088
+ if options.has_key?(k) then options.delete(k)
3089
+ else v
3090
+ end
3091
+ end
3092
+ return filtered, options
3093
+ end
3094
+ def validate_options(options, defaults)
3095
+ defaults.merge(options)
3096
+ end
3097
+ end
3098
+
3154
3099
  # Environment is clean, so just mark it as so unconditionally
3155
3100
  ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] = '1'
3156
3101
 
@@ -3162,7 +3107,6 @@ ENV['GEM_HOME'] = gem_home
3162
3107
  ENV['GEM_PATH'] = gem_path
3163
3108
  ENV['PATH'] = "#{ENV['GEM_HOME']}/bin:#{ENV['PATH']}"
3164
3109
 
3165
-
3166
3110
  Autoproj::OSDependencies.define_osdeps_mode_option
3167
3111
  osdeps_mode = Autoproj::OSDependencies.osdeps_mode.join(",")
3168
3112
  ENV['AUTOPROJ_OSDEPS_MODE'] = osdeps_mode
@@ -3181,6 +3125,7 @@ osdeps_management =
3181
3125
  Autoproj::OSDependencies.new(YAML.load(DEFS))
3182
3126
  end
3183
3127
  osdeps_management.silent = false
3128
+ Autoproj::PackageManagers::GemManager.gem_home = gem_home
3184
3129
  Autoproj::PackageManagers::GemManager.use_cache_dir
3185
3130
 
3186
3131
  begin