autoproj 2.12.1 → 2.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +25 -0
- data/.github/workflows/test.yml +30 -0
- data/.rubocop.yml +79 -91
- data/.rubocop_todo.yml +1473 -0
- data/Gemfile +9 -9
- data/Rakefile +24 -24
- data/autoproj.gemspec +24 -22
- data/bin/alocate +4 -4
- data/bin/alog +6 -7
- data/bin/amake +4 -4
- data/bin/aup +4 -4
- data/bin/autoproj +3 -3
- data/bin/autoproj_bootstrap +225 -200
- data/bin/autoproj_bootstrap.in +7 -8
- data/bin/autoproj_install +224 -199
- data/bin/autoproj_install.in +6 -7
- data/lib/autoproj/aruba_minitest.rb +6 -11
- data/lib/autoproj/autobuild.rb +9 -6
- data/lib/autoproj/autobuild_extensions/archive_importer.rb +10 -11
- data/lib/autoproj/autobuild_extensions/dsl.rb +66 -36
- data/lib/autoproj/autobuild_extensions/git.rb +27 -26
- data/lib/autoproj/autobuild_extensions/package.rb +23 -22
- data/lib/autoproj/autobuild_extensions/python.rb +18 -0
- data/lib/autoproj/autobuild_extensions/svn.rb +1 -2
- data/lib/autoproj/base.rb +1 -1
- data/lib/autoproj/bash_completion.rb +5 -6
- data/lib/autoproj/build_option.rb +22 -24
- data/lib/autoproj/cli/base.rb +26 -26
- data/lib/autoproj/cli/bootstrap.rb +14 -16
- data/lib/autoproj/cli/build.rb +10 -7
- data/lib/autoproj/cli/cache.rb +11 -11
- data/lib/autoproj/cli/clean.rb +10 -10
- data/lib/autoproj/cli/commit.rb +7 -8
- data/lib/autoproj/cli/doc.rb +2 -2
- data/lib/autoproj/cli/envsh.rb +1 -2
- data/lib/autoproj/cli/exec.rb +60 -20
- data/lib/autoproj/cli/inspection_tool.rb +13 -7
- data/lib/autoproj/cli/locate.rb +30 -41
- data/lib/autoproj/cli/log.rb +7 -7
- data/lib/autoproj/cli/main.rb +217 -205
- data/lib/autoproj/cli/main_doc.rb +22 -21
- data/lib/autoproj/cli/main_global.rb +44 -19
- data/lib/autoproj/cli/main_plugin.rb +18 -18
- data/lib/autoproj/cli/main_test.rb +28 -27
- data/lib/autoproj/cli/manifest.rb +7 -7
- data/lib/autoproj/cli/osdeps.rb +12 -11
- data/lib/autoproj/cli/patcher.rb +2 -3
- data/lib/autoproj/cli/query.rb +17 -18
- data/lib/autoproj/cli/reconfigure.rb +1 -2
- data/lib/autoproj/cli/reset.rb +9 -12
- data/lib/autoproj/cli/show.rb +38 -39
- data/lib/autoproj/cli/status.rb +56 -44
- data/lib/autoproj/cli/switch_config.rb +5 -6
- data/lib/autoproj/cli/tag.rb +12 -11
- data/lib/autoproj/cli/test.rb +7 -7
- data/lib/autoproj/cli/update.rb +97 -43
- data/lib/autoproj/cli/utility.rb +14 -12
- data/lib/autoproj/cli/version.rb +42 -40
- data/lib/autoproj/cli/versions.rb +14 -15
- data/lib/autoproj/cli/watch.rb +33 -37
- data/lib/autoproj/cli/which.rb +16 -20
- data/lib/autoproj/cli.rb +4 -2
- data/lib/autoproj/configuration.rb +78 -86
- data/lib/autoproj/default.osdeps +29 -3
- data/lib/autoproj/environment.rb +42 -23
- data/lib/autoproj/exceptions.rb +9 -3
- data/lib/autoproj/find_workspace.rb +20 -25
- data/lib/autoproj/git_server_configuration.rb +40 -44
- data/lib/autoproj/gitorious.rb +1 -1
- data/lib/autoproj/installation_manifest.rb +64 -29
- data/lib/autoproj/local_package_set.rb +13 -11
- data/lib/autoproj/manifest.rb +139 -132
- data/lib/autoproj/metapackage.rb +2 -6
- data/lib/autoproj/ops/atomic_write.rb +7 -6
- data/lib/autoproj/ops/build.rb +4 -6
- data/lib/autoproj/ops/cache.rb +41 -43
- data/lib/autoproj/ops/cached_env.rb +5 -4
- data/lib/autoproj/ops/configuration.rb +519 -507
- data/lib/autoproj/ops/import.rb +88 -63
- data/lib/autoproj/ops/install.rb +218 -192
- data/lib/autoproj/ops/loader.rb +77 -76
- data/lib/autoproj/ops/main_config_switcher.rb +36 -45
- data/lib/autoproj/ops/phase_reporting.rb +4 -4
- data/lib/autoproj/ops/snapshot.rb +250 -247
- data/lib/autoproj/ops/tools.rb +76 -78
- data/lib/autoproj/ops/watch.rb +6 -6
- data/lib/autoproj/ops/which.rb +17 -14
- data/lib/autoproj/options.rb +13 -2
- data/lib/autoproj/os_package_installer.rb +102 -92
- data/lib/autoproj/os_package_query.rb +7 -13
- data/lib/autoproj/os_package_resolver.rb +189 -140
- data/lib/autoproj/os_repository_installer.rb +4 -4
- data/lib/autoproj/os_repository_resolver.rb +8 -6
- data/lib/autoproj/package_definition.rb +12 -13
- data/lib/autoproj/package_managers/apt_dpkg_manager.rb +19 -11
- data/lib/autoproj/package_managers/bundler_manager.rb +186 -129
- data/lib/autoproj/package_managers/debian_version.rb +25 -21
- data/lib/autoproj/package_managers/emerge_manager.rb +2 -3
- data/lib/autoproj/package_managers/gem_manager.rb +68 -77
- data/lib/autoproj/package_managers/homebrew_manager.rb +3 -4
- data/lib/autoproj/package_managers/manager.rb +8 -3
- data/lib/autoproj/package_managers/pacman_manager.rb +2 -3
- data/lib/autoproj/package_managers/pip_manager.rb +30 -28
- data/lib/autoproj/package_managers/pkg_manager.rb +3 -4
- data/lib/autoproj/package_managers/port_manager.rb +2 -3
- data/lib/autoproj/package_managers/shell_script_manager.rb +47 -25
- data/lib/autoproj/package_managers/unknown_os_manager.rb +5 -8
- data/lib/autoproj/package_managers/yum_manager.rb +12 -15
- data/lib/autoproj/package_managers/zypper_manager.rb +11 -14
- data/lib/autoproj/package_manifest.rb +28 -74
- data/lib/autoproj/package_selection.rb +187 -187
- data/lib/autoproj/package_set.rb +145 -114
- data/lib/autoproj/python.rb +297 -0
- data/lib/autoproj/query_base.rb +20 -14
- data/lib/autoproj/reporter.rb +19 -19
- data/lib/autoproj/repository_managers/apt.rb +102 -68
- data/lib/autoproj/repository_managers/unknown_os_manager.rb +3 -3
- data/lib/autoproj/ros_condition_parser.rb +84 -0
- data/lib/autoproj/ros_package_manifest.rb +125 -0
- data/lib/autoproj/shell_completion.rb +16 -13
- data/lib/autoproj/source_package_query.rb +29 -36
- data/lib/autoproj/system.rb +32 -21
- data/lib/autoproj/test.rb +131 -106
- data/lib/autoproj/variable_expansion.rb +10 -10
- data/lib/autoproj/vcs_definition.rb +53 -37
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +143 -108
- data/lib/autoproj/zsh_completion.rb +8 -9
- data/lib/autoproj.rb +55 -53
- data/samples/autoproj/init.rb +1 -2
- metadata +86 -65
- data/.travis.yml +0 -22
data/lib/autoproj/cli/which.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require "autoproj"
|
2
|
+
require "autoproj/ops/cached_env"
|
3
|
+
require "autoproj/ops/which"
|
4
|
+
require "autoproj/ops/watch"
|
5
5
|
|
6
6
|
module Autoproj
|
7
7
|
module CLI
|
8
8
|
class Which
|
9
9
|
def initialize
|
10
10
|
@root_dir = Autoproj.find_workspace_dir
|
11
|
-
|
12
|
-
require
|
11
|
+
unless @root_dir
|
12
|
+
require "autoproj/workspace"
|
13
13
|
# Will do all sorts of error reporting,
|
14
14
|
# or may be able to resolve
|
15
15
|
@root_dir = Workspace.default.root_dir
|
@@ -18,20 +18,18 @@ module Autoproj
|
|
18
18
|
|
19
19
|
def load_cached_env
|
20
20
|
env = Ops.load_cached_env(@root_dir)
|
21
|
-
return
|
21
|
+
return unless env
|
22
22
|
|
23
|
-
Autobuild::Environment
|
24
|
-
environment_from_export(env, ENV)
|
23
|
+
Autobuild::Environment
|
24
|
+
.environment_from_export(env, ENV)
|
25
25
|
end
|
26
26
|
|
27
27
|
def run(cmd, use_cached_env: Ops.watch_running?(@root_dir))
|
28
|
-
if use_cached_env
|
29
|
-
env = load_cached_env
|
30
|
-
end
|
28
|
+
env = load_cached_env if use_cached_env
|
31
29
|
|
32
|
-
|
33
|
-
require
|
34
|
-
require
|
30
|
+
unless env
|
31
|
+
require "autoproj"
|
32
|
+
require "autoproj/cli/inspection_tool"
|
35
33
|
ws = Workspace.from_dir(@root_dir)
|
36
34
|
loader = InspectionTool.new(ws)
|
37
35
|
loader.initialize_and_load
|
@@ -39,17 +37,15 @@ module Autoproj
|
|
39
37
|
env = ws.full_env.resolved_env
|
40
38
|
end
|
41
39
|
|
42
|
-
path = env[
|
40
|
+
path = env["PATH"].split(File::PATH_SEPARATOR)
|
43
41
|
puts Ops.which(cmd, path_entries: path)
|
44
42
|
rescue ExecutableNotFound => e
|
45
|
-
require
|
43
|
+
require "autoproj" # make sure everything is available for error reporting
|
46
44
|
raise CLIInvalidArguments, e.message, e.backtrace
|
47
45
|
rescue Exception
|
48
|
-
require
|
46
|
+
require "autoproj" # make sure everything is available for error reporting
|
49
47
|
raise
|
50
48
|
end
|
51
49
|
end
|
52
50
|
end
|
53
51
|
end
|
54
|
-
|
55
|
-
|
data/lib/autoproj/cli.rb
CHANGED
@@ -5,10 +5,13 @@ module Autoproj
|
|
5
5
|
true
|
6
6
|
end
|
7
7
|
end
|
8
|
+
|
8
9
|
class CLIInvalidArguments < CLIException
|
9
10
|
end
|
11
|
+
|
10
12
|
class CLIAmbiguousArguments < CLIException
|
11
13
|
end
|
14
|
+
|
12
15
|
class CLIInvalidSelection < CLIException
|
13
16
|
end
|
14
17
|
|
@@ -20,10 +23,9 @@ module Autoproj
|
|
20
23
|
:find_files
|
21
24
|
end
|
22
25
|
|
23
|
-
Gem.send(finder_name,
|
26
|
+
Gem.send(finder_name, "autoproj-*", true).each do |path|
|
24
27
|
require path
|
25
28
|
end
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
29
|
-
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require "backports/2.4.0/float/dup"
|
2
|
+
require "backports/2.4.0/fixnum/dup"
|
3
|
+
require "backports/2.4.0/nil_class/dup"
|
4
|
+
require "backports/2.4.0/false_class/dup"
|
5
|
+
require "backports/2.4.0/true_class/dup"
|
6
6
|
|
7
7
|
module Autoproj
|
8
8
|
# Class that does the handling of configuration options as well as
|
@@ -89,14 +89,13 @@ module Autoproj
|
|
89
89
|
overrides[option_name] = value
|
90
90
|
end
|
91
91
|
|
92
|
-
# Remove a specific override
|
93
|
-
def reset_overrides(name)
|
94
|
-
@overrides.delete(name)
|
95
|
-
end
|
96
|
-
|
97
92
|
# Remove all overrides
|
98
|
-
def reset_overrides
|
99
|
-
|
93
|
+
def reset_overrides(*names)
|
94
|
+
if names.empty?
|
95
|
+
@overrides.clear
|
96
|
+
else
|
97
|
+
names.each { |n| @overrides.delete(n) }
|
98
|
+
end
|
100
99
|
end
|
101
100
|
|
102
101
|
# Tests whether a value is set for the given option name
|
@@ -108,32 +107,26 @@ module Autoproj
|
|
108
107
|
|
109
108
|
# Get the value for a given option
|
110
109
|
def get(key, *default_value)
|
111
|
-
if overrides.has_key?(key)
|
112
|
-
return overrides[key].dup
|
113
|
-
end
|
110
|
+
return overrides[key].dup if overrides.has_key?(key)
|
114
111
|
|
115
112
|
has_value = config.has_key?(key)
|
116
113
|
value, validated = config[key]
|
117
114
|
|
118
115
|
if !declared?(key)
|
119
116
|
if has_value
|
120
|
-
|
117
|
+
value.dup
|
121
118
|
elsif default_value.empty?
|
122
119
|
raise ConfigError, "undeclared option '#{key}'"
|
123
120
|
else
|
124
121
|
default_value.first.dup
|
125
122
|
end
|
123
|
+
elsif validated
|
124
|
+
doc = declared_options[key].short_doc
|
125
|
+
doc = "#{doc}:" if doc[-1, 1] != "?"
|
126
|
+
displayed_options[key] = value
|
127
|
+
value.dup
|
126
128
|
else
|
127
|
-
|
128
|
-
doc = declared_options[key].short_doc
|
129
|
-
if doc[-1, 1] != "?"
|
130
|
-
doc = "#{doc}:"
|
131
|
-
end
|
132
|
-
displayed_options[key] = value
|
133
|
-
value.dup
|
134
|
-
else
|
135
|
-
configure(key).dup
|
136
|
-
end
|
129
|
+
configure(key).dup
|
137
130
|
end
|
138
131
|
end
|
139
132
|
|
@@ -184,8 +177,8 @@ module Autoproj
|
|
184
177
|
# @return [Object] the new option value
|
185
178
|
# @raise ConfigError if the option is not declared
|
186
179
|
def configure(option_name)
|
187
|
-
if opt = declared_options[option_name]
|
188
|
-
if current_value = config[option_name]
|
180
|
+
if (opt = declared_options[option_name])
|
181
|
+
if (current_value = config[option_name])
|
189
182
|
current_value = current_value.first
|
190
183
|
end
|
191
184
|
is_default = false
|
@@ -210,15 +203,13 @@ module Autoproj
|
|
210
203
|
|
211
204
|
def load(path: self.path, reconfigure: false)
|
212
205
|
current_keys = @config.keys
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
if current_keys.empty?
|
219
|
-
@modified = false
|
220
|
-
end
|
206
|
+
return unless (h = YAML.load(File.read(path)))
|
207
|
+
|
208
|
+
h.each do |key, value|
|
209
|
+
current_keys.delete(key)
|
210
|
+
set(key, value, !reconfigure)
|
221
211
|
end
|
212
|
+
@modified = false if current_keys.empty?
|
222
213
|
end
|
223
214
|
|
224
215
|
def reconfigure!
|
@@ -244,47 +235,47 @@ module Autoproj
|
|
244
235
|
@modified = false
|
245
236
|
end
|
246
237
|
|
247
|
-
def each_reused_autoproj_installation
|
248
|
-
if has_value_for?(
|
249
|
-
get(
|
250
|
-
else
|
238
|
+
def each_reused_autoproj_installation(&block)
|
239
|
+
if has_value_for?("reused_autoproj_installations")
|
240
|
+
get("reused_autoproj_installations").each(&block)
|
241
|
+
else
|
242
|
+
[].each(&block)
|
251
243
|
end
|
252
244
|
end
|
253
245
|
|
254
246
|
def import_log_enabled?
|
255
|
-
get(
|
247
|
+
get("import_log_enabled", true)
|
256
248
|
end
|
257
249
|
|
258
250
|
def import_log_enabled=(value)
|
259
|
-
set(
|
251
|
+
set("import_log_enabled", !!value)
|
260
252
|
end
|
261
253
|
|
262
254
|
def parallel_build_level
|
263
|
-
get(
|
255
|
+
get("parallel_build_level", nil) || Autobuild.parallel_build_level
|
264
256
|
end
|
265
257
|
|
266
258
|
def parallel_build_level=(level)
|
267
|
-
set(
|
259
|
+
set("parallel_build_level", level)
|
268
260
|
Autobuild.parallel_build_level = level
|
269
261
|
end
|
270
262
|
|
271
263
|
def parallel_import_level
|
272
|
-
get(
|
264
|
+
get("parallel_import_level", 10)
|
273
265
|
end
|
274
266
|
|
275
267
|
def parallel_import_level=(level)
|
276
|
-
set(
|
268
|
+
set("parallel_import_level", level)
|
277
269
|
end
|
278
270
|
|
279
271
|
# The user-wide place where RubyGems installs gems
|
280
272
|
def self.dot_gem_dir
|
281
|
-
|
273
|
+
Ops::Install.dot_gem_dir
|
282
274
|
end
|
283
275
|
|
284
276
|
# The Ruby platform and version-specific subdirectory used by bundler and rubygem
|
285
277
|
def self.gems_path_suffix
|
286
|
-
|
287
|
-
relative_path_from(Pathname.new(dot_gem_dir)).to_s
|
278
|
+
Ops::Install.gems_path_suffix
|
288
279
|
end
|
289
280
|
|
290
281
|
# The gem install root into which the workspace gems are installed
|
@@ -300,7 +291,7 @@ module Autoproj
|
|
300
291
|
# @param [Workspace] ws the workspace whose gems are being considered
|
301
292
|
# @return [String]
|
302
293
|
def gems_install_path
|
303
|
-
get(
|
294
|
+
get("gems_install_path")
|
304
295
|
end
|
305
296
|
|
306
297
|
# The GEM_HOME into which the workspace gems are installed
|
@@ -313,55 +304,54 @@ module Autoproj
|
|
313
304
|
|
314
305
|
# The full path to the expected ruby executable
|
315
306
|
def ruby_executable
|
316
|
-
|
317
|
-
path
|
318
|
-
else
|
307
|
+
unless (path = get("ruby_executable", nil))
|
319
308
|
path = OSPackageResolver.autodetect_ruby_program
|
320
|
-
set(
|
321
|
-
path
|
309
|
+
set("ruby_executable", path, true)
|
322
310
|
end
|
311
|
+
|
312
|
+
path
|
323
313
|
end
|
324
314
|
|
325
315
|
# Verify that the Ruby executable that is being used to run autoproj
|
326
316
|
# matches the one expected in the configuration
|
327
317
|
def validate_ruby_executable
|
328
|
-
actual
|
329
|
-
if has_value_for?(
|
330
|
-
expected = get(
|
318
|
+
actual = OSPackageResolver.autodetect_ruby_program
|
319
|
+
if has_value_for?("ruby_executable")
|
320
|
+
expected = get("ruby_executable")
|
331
321
|
if expected != actual
|
332
322
|
raise ConfigError.new, "this autoproj installation was bootstrapped using #{expected}, but you are currently running under #{actual}. Changing the Ruby executable for in an existing autoproj workspace is unsupported"
|
333
323
|
end
|
334
324
|
else
|
335
|
-
set(
|
325
|
+
set("ruby_executable", actual, true)
|
336
326
|
end
|
337
327
|
end
|
338
328
|
|
339
329
|
def use_prerelease?
|
340
330
|
use_prerelease =
|
341
|
-
if env_flag = ENV[
|
342
|
-
env_flag ==
|
343
|
-
elsif has_value_for?(
|
344
|
-
get(
|
331
|
+
if (env_flag = ENV["AUTOPROJ_USE_PRERELEASE"])
|
332
|
+
env_flag == "1"
|
333
|
+
elsif has_value_for?("autoproj_use_prerelease")
|
334
|
+
get("autoproj_use_prerelease")
|
345
335
|
end
|
346
336
|
set "autoproj_use_prerelease", (use_prerelease ? true : false), true
|
347
337
|
use_prerelease
|
348
338
|
end
|
349
339
|
|
350
340
|
def shell_helpers?
|
351
|
-
get
|
341
|
+
get "shell_helpers", true
|
352
342
|
end
|
353
343
|
|
354
344
|
def shell_helpers=(flag)
|
355
|
-
set
|
345
|
+
set "shell_helpers", flag, true
|
356
346
|
end
|
357
347
|
|
358
348
|
def bundler_version
|
359
|
-
get
|
349
|
+
get "bundler_version", nil
|
360
350
|
end
|
361
351
|
|
362
352
|
def apply_autobuild_configuration
|
363
|
-
if has_value_for?(
|
364
|
-
params = get(
|
353
|
+
if has_value_for?("autobuild")
|
354
|
+
params = get("autobuild")
|
365
355
|
if params.kind_of?(Hash)
|
366
356
|
params.each do |k, v|
|
367
357
|
Autobuild.send("#{k}=", v)
|
@@ -372,17 +362,17 @@ module Autoproj
|
|
372
362
|
|
373
363
|
# A cache directory for autobuild's importers
|
374
364
|
def importer_cache_dir
|
375
|
-
get(
|
365
|
+
get("importer_cache_dir", nil)
|
376
366
|
end
|
377
367
|
|
378
368
|
# Set import and gem cache directory
|
379
369
|
def importer_cache_dir=(path)
|
380
|
-
set(
|
370
|
+
set("importer_cache_dir", path, true)
|
381
371
|
end
|
382
372
|
|
383
373
|
# Sets the directory in which packages will be installed
|
384
374
|
def prefix_dir=(path)
|
385
|
-
set(
|
375
|
+
set("prefix", path, true)
|
386
376
|
end
|
387
377
|
|
388
378
|
# The directory in which packages will be installed.
|
@@ -394,19 +384,19 @@ module Autoproj
|
|
394
384
|
#
|
395
385
|
# @return [String]
|
396
386
|
def prefix_dir
|
397
|
-
get(
|
387
|
+
get("prefix", "install")
|
398
388
|
end
|
399
389
|
|
400
390
|
# Sets the shells used in this workspace.
|
401
391
|
def user_shells=(shells)
|
402
|
-
set(
|
392
|
+
set("user_shells", shells, true)
|
403
393
|
end
|
404
394
|
|
405
395
|
# The shells used in this workspace.
|
406
396
|
#
|
407
397
|
# @return [Array<String>]
|
408
398
|
def user_shells
|
409
|
-
get(
|
399
|
+
get("user_shells", [])
|
410
400
|
end
|
411
401
|
|
412
402
|
# Defines the temporary area in which packages should put their build
|
@@ -420,7 +410,7 @@ module Autoproj
|
|
420
410
|
#
|
421
411
|
# @return [String]
|
422
412
|
def build_dir
|
423
|
-
get(
|
413
|
+
get("build", "build")
|
424
414
|
end
|
425
415
|
|
426
416
|
# Defines a folder to which source packages will be layed out relative to
|
@@ -432,7 +422,7 @@ module Autoproj
|
|
432
422
|
#
|
433
423
|
# @return [String,nil]
|
434
424
|
def source_dir
|
435
|
-
get(
|
425
|
+
get("source", nil)
|
436
426
|
end
|
437
427
|
|
438
428
|
# Returns true if there should be one prefix per package
|
@@ -441,14 +431,14 @@ module Autoproj
|
|
441
431
|
#
|
442
432
|
# @return [Boolean]
|
443
433
|
def separate_prefixes?
|
444
|
-
get(
|
434
|
+
get("separate_prefixes", false)
|
445
435
|
end
|
446
436
|
|
447
437
|
# Controls whether there should be one prefix per package
|
448
438
|
#
|
449
439
|
# @see separate_prefixes?
|
450
440
|
def separate_prefixes=(flag)
|
451
|
-
set(
|
441
|
+
set("separate_prefixes", flag, true)
|
452
442
|
end
|
453
443
|
|
454
444
|
# Returns true if packages and prefixes should be auto-generated, based
|
@@ -459,7 +449,7 @@ module Autoproj
|
|
459
449
|
#
|
460
450
|
# @return [Boolean]
|
461
451
|
def randomize_layout?
|
462
|
-
get(
|
452
|
+
get("randomize_layout", false)
|
463
453
|
end
|
464
454
|
|
465
455
|
# Sets whether the layout should be randomized
|
@@ -467,7 +457,7 @@ module Autoproj
|
|
467
457
|
# @return [Boolean]
|
468
458
|
# @see randomize_layout?
|
469
459
|
def randomize_layout=(value)
|
470
|
-
set(
|
460
|
+
set("randomize_layout", value, true)
|
471
461
|
end
|
472
462
|
|
473
463
|
# Returns true if the configuration should be performed interactively
|
@@ -477,17 +467,18 @@ module Autoproj
|
|
477
467
|
def interactive?
|
478
468
|
if !interactive.nil?
|
479
469
|
return interactive
|
480
|
-
elsif ENV[
|
470
|
+
elsif ENV["AUTOPROJ_NONINTERACTIVE"] == "1"
|
481
471
|
return false
|
482
472
|
elsif has_value_for?("interactive")
|
483
|
-
return get(
|
473
|
+
return get("interactive")
|
484
474
|
end
|
475
|
+
|
485
476
|
true
|
486
477
|
end
|
487
478
|
|
488
479
|
DEFAULT_UTILITY_SETUP = Hash[
|
489
|
-
|
490
|
-
|
480
|
+
"doc" => true,
|
481
|
+
"test" => false]
|
491
482
|
|
492
483
|
# The configuration key that should be used to store the utility
|
493
484
|
# enable/disable information
|
@@ -513,7 +504,8 @@ module Autoproj
|
|
513
504
|
utility_config = get(utility_key(utility), Hash.new)
|
514
505
|
if utility_config.has_key?(package)
|
515
506
|
utility_config[package]
|
516
|
-
else
|
507
|
+
else
|
508
|
+
get("#{utility_key(utility)}_default", DEFAULT_UTILITY_SETUP[utility])
|
517
509
|
end
|
518
510
|
end
|
519
511
|
|
@@ -596,7 +588,7 @@ module Autoproj
|
|
596
588
|
#
|
597
589
|
# This is false by default
|
598
590
|
def prefer_indep_over_os_packages?
|
599
|
-
get(
|
591
|
+
get("prefer_indep_over_os_packages", false)
|
600
592
|
end
|
601
593
|
|
602
594
|
# The configuration as a key => value map
|
data/lib/autoproj/default.osdeps
CHANGED
@@ -92,6 +92,12 @@ ruby24:
|
|
92
92
|
ruby25:
|
93
93
|
default: ignore # we assume that if the user has a ruby 2.5 runtime, it is usable
|
94
94
|
|
95
|
+
ruby26:
|
96
|
+
default: ignore # we assume that if the user has a ruby 2.5 runtime, it is usable
|
97
|
+
|
98
|
+
ruby27:
|
99
|
+
default: ignore # we assume that if the user has a ruby 2.5 runtime, it is usable
|
100
|
+
|
95
101
|
build-essential:
|
96
102
|
debian,ubuntu: build-essential
|
97
103
|
gentoo: ignore
|
@@ -132,15 +138,19 @@ archive:
|
|
132
138
|
debian,ubuntu:
|
133
139
|
- tar
|
134
140
|
- unzip
|
141
|
+
- ca-certificates
|
135
142
|
gentoo:
|
136
143
|
- app-arch/tar
|
137
144
|
- app-arch/unzip
|
145
|
+
- app-misc/ca-certificates
|
138
146
|
arch:
|
139
147
|
- tar
|
140
148
|
- unzip
|
149
|
+
- ca-certificates
|
141
150
|
fedora:
|
142
151
|
- tar
|
143
152
|
- unzip
|
153
|
+
- ca-certificates
|
144
154
|
macos-port:
|
145
155
|
- gnutar
|
146
156
|
- unzip
|
@@ -149,13 +159,19 @@ archive:
|
|
149
159
|
opensuse:
|
150
160
|
- tar
|
151
161
|
- unzip
|
162
|
+
- ca-certificates
|
152
163
|
default: ignore
|
153
164
|
|
154
165
|
cvs:
|
155
166
|
default: cvs
|
156
167
|
|
157
168
|
pip:
|
158
|
-
debian
|
169
|
+
debian:
|
170
|
+
'8,jessie,9,stretch': python-pip
|
171
|
+
default: python3-pip
|
172
|
+
ubuntu:
|
173
|
+
'16.04,18.04': python-pip
|
174
|
+
default: python3-pip
|
159
175
|
arch: python2-pip
|
160
176
|
opensuse: python-pip
|
161
177
|
fedora: python-pip
|
@@ -164,7 +180,12 @@ pip:
|
|
164
180
|
|
165
181
|
python:
|
166
182
|
arch: python2
|
167
|
-
debian
|
183
|
+
debian:
|
184
|
+
'8,jessie,9,stretch': python-dev
|
185
|
+
default: python3-dev
|
186
|
+
ubuntu:
|
187
|
+
'16.04,18.04': python-dev
|
188
|
+
default: python3-dev
|
168
189
|
fedora: python-devel
|
169
190
|
freebsd: python-devel
|
170
191
|
gentoo: dev-lang/python
|
@@ -173,7 +194,12 @@ python:
|
|
173
194
|
|
174
195
|
python-setuptools:
|
175
196
|
arch: python2-distribute
|
176
|
-
debian
|
197
|
+
debian:
|
198
|
+
'8,jessie,9,stretch': python-setuptools
|
199
|
+
default: python3-setuptools
|
200
|
+
ubuntu:
|
201
|
+
'16.04,18.04': python-setuptools
|
202
|
+
default: python3-setuptools
|
177
203
|
fedora: python-setuptools
|
178
204
|
gentoo: dev-python/setuptools
|
179
205
|
default: ignore # will be installed manually by the user
|