autoproj 2.12.0 → 2.15.0
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 +22 -22
- data/bin/alocate +4 -4
- data/bin/alog +6 -7
- data/bin/amake +4 -4
- data/bin/aup +4 -4
- data/bin/autoproj +2 -2
- data/bin/autoproj_bootstrap +186 -183
- data/bin/autoproj_bootstrap.in +7 -8
- data/bin/autoproj_install +185 -182
- data/bin/autoproj_install.in +6 -7
- data/lib/autoproj/aruba_minitest.rb +6 -11
- data/lib/autoproj/autobuild.rb +5 -6
- data/lib/autoproj/autobuild_extensions/archive_importer.rb +10 -11
- data/lib/autoproj/autobuild_extensions/dsl.rb +61 -44
- data/lib/autoproj/autobuild_extensions/git.rb +27 -26
- data/lib/autoproj/autobuild_extensions/package.rb +23 -22
- 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 +27 -27
- data/lib/autoproj/cli/bootstrap.rb +14 -16
- data/lib/autoproj/cli/build.rb +18 -10
- data/lib/autoproj/cli/cache.rb +51 -8
- 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 +18 -13
- 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 +48 -55
- 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 +104 -51
- 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 -85
- 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 +145 -135
- 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 +64 -53
- data/lib/autoproj/ops/cached_env.rb +7 -6
- data/lib/autoproj/ops/configuration.rb +511 -506
- data/lib/autoproj/ops/import.rb +90 -61
- data/lib/autoproj/ops/install.rb +179 -175
- 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 +46 -31
- data/lib/autoproj/package_managers/bundler_manager.rb +156 -118
- 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 +37 -27
- 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 +66 -36
- 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 +66 -53
- data/lib/autoproj/package_selection.rb +187 -187
- data/lib/autoproj/package_set.rb +128 -114
- data/lib/autoproj/python.rb +285 -0
- data/lib/autoproj/query_base.rb +20 -14
- data/lib/autoproj/reporter.rb +19 -19
- data/lib/autoproj/repository_managers/apt.rb +101 -67
- data/lib/autoproj/repository_managers/unknown_os_manager.rb +3 -3
- 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 +162 -117
- data/lib/autoproj/zsh_completion.rb +8 -9
- data/lib/autoproj.rb +53 -53
- data/samples/autoproj/init.rb +1 -2
- metadata +62 -72
- 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,36 +235,37 @@ 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
|
@@ -283,8 +275,8 @@ module Autoproj
|
|
283
275
|
|
284
276
|
# The Ruby platform and version-specific subdirectory used by bundler and rubygem
|
285
277
|
def self.gems_path_suffix
|
286
|
-
@gems_path_suffix ||= Pathname.new(Gem.user_dir)
|
287
|
-
|
278
|
+
@gems_path_suffix ||= Pathname.new(Gem.user_dir)
|
279
|
+
.relative_path_from(Pathname.new(dot_gem_dir)).to_s
|
288
280
|
end
|
289
281
|
|
290
282
|
# The gem install root into which the workspace gems are installed
|
@@ -300,7 +292,7 @@ module Autoproj
|
|
300
292
|
# @param [Workspace] ws the workspace whose gems are being considered
|
301
293
|
# @return [String]
|
302
294
|
def gems_install_path
|
303
|
-
get(
|
295
|
+
get("gems_install_path")
|
304
296
|
end
|
305
297
|
|
306
298
|
# The GEM_HOME into which the workspace gems are installed
|
@@ -313,55 +305,54 @@ module Autoproj
|
|
313
305
|
|
314
306
|
# The full path to the expected ruby executable
|
315
307
|
def ruby_executable
|
316
|
-
|
317
|
-
path
|
318
|
-
else
|
308
|
+
unless (path = get("ruby_executable", nil))
|
319
309
|
path = OSPackageResolver.autodetect_ruby_program
|
320
|
-
set(
|
321
|
-
path
|
310
|
+
set("ruby_executable", path, true)
|
322
311
|
end
|
312
|
+
|
313
|
+
path
|
323
314
|
end
|
324
315
|
|
325
316
|
# Verify that the Ruby executable that is being used to run autoproj
|
326
317
|
# matches the one expected in the configuration
|
327
318
|
def validate_ruby_executable
|
328
|
-
actual
|
329
|
-
if has_value_for?(
|
330
|
-
expected = get(
|
319
|
+
actual = OSPackageResolver.autodetect_ruby_program
|
320
|
+
if has_value_for?("ruby_executable")
|
321
|
+
expected = get("ruby_executable")
|
331
322
|
if expected != actual
|
332
323
|
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
324
|
end
|
334
325
|
else
|
335
|
-
set(
|
326
|
+
set("ruby_executable", actual, true)
|
336
327
|
end
|
337
328
|
end
|
338
329
|
|
339
330
|
def use_prerelease?
|
340
331
|
use_prerelease =
|
341
|
-
if env_flag = ENV[
|
342
|
-
env_flag ==
|
343
|
-
elsif has_value_for?(
|
344
|
-
get(
|
332
|
+
if (env_flag = ENV["AUTOPROJ_USE_PRERELEASE"])
|
333
|
+
env_flag == "1"
|
334
|
+
elsif has_value_for?("autoproj_use_prerelease")
|
335
|
+
get("autoproj_use_prerelease")
|
345
336
|
end
|
346
337
|
set "autoproj_use_prerelease", (use_prerelease ? true : false), true
|
347
338
|
use_prerelease
|
348
339
|
end
|
349
340
|
|
350
341
|
def shell_helpers?
|
351
|
-
get
|
342
|
+
get "shell_helpers", true
|
352
343
|
end
|
353
344
|
|
354
345
|
def shell_helpers=(flag)
|
355
|
-
set
|
346
|
+
set "shell_helpers", flag, true
|
356
347
|
end
|
357
348
|
|
358
349
|
def bundler_version
|
359
|
-
get
|
350
|
+
get "bundler_version", nil
|
360
351
|
end
|
361
352
|
|
362
353
|
def apply_autobuild_configuration
|
363
|
-
if has_value_for?(
|
364
|
-
params = get(
|
354
|
+
if has_value_for?("autobuild")
|
355
|
+
params = get("autobuild")
|
365
356
|
if params.kind_of?(Hash)
|
366
357
|
params.each do |k, v|
|
367
358
|
Autobuild.send("#{k}=", v)
|
@@ -372,17 +363,17 @@ module Autoproj
|
|
372
363
|
|
373
364
|
# A cache directory for autobuild's importers
|
374
365
|
def importer_cache_dir
|
375
|
-
get(
|
366
|
+
get("importer_cache_dir", nil)
|
376
367
|
end
|
377
368
|
|
378
369
|
# Set import and gem cache directory
|
379
370
|
def importer_cache_dir=(path)
|
380
|
-
set(
|
371
|
+
set("importer_cache_dir", path, true)
|
381
372
|
end
|
382
373
|
|
383
374
|
# Sets the directory in which packages will be installed
|
384
375
|
def prefix_dir=(path)
|
385
|
-
set(
|
376
|
+
set("prefix", path, true)
|
386
377
|
end
|
387
378
|
|
388
379
|
# The directory in which packages will be installed.
|
@@ -394,19 +385,19 @@ module Autoproj
|
|
394
385
|
#
|
395
386
|
# @return [String]
|
396
387
|
def prefix_dir
|
397
|
-
get(
|
388
|
+
get("prefix", "install")
|
398
389
|
end
|
399
390
|
|
400
391
|
# Sets the shells used in this workspace.
|
401
392
|
def user_shells=(shells)
|
402
|
-
set(
|
393
|
+
set("user_shells", shells, true)
|
403
394
|
end
|
404
395
|
|
405
396
|
# The shells used in this workspace.
|
406
397
|
#
|
407
398
|
# @return [Array<String>]
|
408
399
|
def user_shells
|
409
|
-
get(
|
400
|
+
get("user_shells", [])
|
410
401
|
end
|
411
402
|
|
412
403
|
# Defines the temporary area in which packages should put their build
|
@@ -420,7 +411,7 @@ module Autoproj
|
|
420
411
|
#
|
421
412
|
# @return [String]
|
422
413
|
def build_dir
|
423
|
-
get(
|
414
|
+
get("build", "build")
|
424
415
|
end
|
425
416
|
|
426
417
|
# Defines a folder to which source packages will be layed out relative to
|
@@ -432,7 +423,7 @@ module Autoproj
|
|
432
423
|
#
|
433
424
|
# @return [String,nil]
|
434
425
|
def source_dir
|
435
|
-
get(
|
426
|
+
get("source", nil)
|
436
427
|
end
|
437
428
|
|
438
429
|
# Returns true if there should be one prefix per package
|
@@ -441,14 +432,14 @@ module Autoproj
|
|
441
432
|
#
|
442
433
|
# @return [Boolean]
|
443
434
|
def separate_prefixes?
|
444
|
-
get(
|
435
|
+
get("separate_prefixes", false)
|
445
436
|
end
|
446
437
|
|
447
438
|
# Controls whether there should be one prefix per package
|
448
439
|
#
|
449
440
|
# @see separate_prefixes?
|
450
441
|
def separate_prefixes=(flag)
|
451
|
-
set(
|
442
|
+
set("separate_prefixes", flag, true)
|
452
443
|
end
|
453
444
|
|
454
445
|
# Returns true if packages and prefixes should be auto-generated, based
|
@@ -459,7 +450,7 @@ module Autoproj
|
|
459
450
|
#
|
460
451
|
# @return [Boolean]
|
461
452
|
def randomize_layout?
|
462
|
-
get(
|
453
|
+
get("randomize_layout", false)
|
463
454
|
end
|
464
455
|
|
465
456
|
# Sets whether the layout should be randomized
|
@@ -467,7 +458,7 @@ module Autoproj
|
|
467
458
|
# @return [Boolean]
|
468
459
|
# @see randomize_layout?
|
469
460
|
def randomize_layout=(value)
|
470
|
-
set(
|
461
|
+
set("randomize_layout", value, true)
|
471
462
|
end
|
472
463
|
|
473
464
|
# Returns true if the configuration should be performed interactively
|
@@ -477,17 +468,18 @@ module Autoproj
|
|
477
468
|
def interactive?
|
478
469
|
if !interactive.nil?
|
479
470
|
return interactive
|
480
|
-
elsif ENV[
|
471
|
+
elsif ENV["AUTOPROJ_NONINTERACTIVE"] == "1"
|
481
472
|
return false
|
482
473
|
elsif has_value_for?("interactive")
|
483
|
-
return get(
|
474
|
+
return get("interactive")
|
484
475
|
end
|
476
|
+
|
485
477
|
true
|
486
478
|
end
|
487
479
|
|
488
480
|
DEFAULT_UTILITY_SETUP = Hash[
|
489
|
-
|
490
|
-
|
481
|
+
"doc" => true,
|
482
|
+
"test" => false]
|
491
483
|
|
492
484
|
# The configuration key that should be used to store the utility
|
493
485
|
# enable/disable information
|
@@ -513,7 +505,8 @@ module Autoproj
|
|
513
505
|
utility_config = get(utility_key(utility), Hash.new)
|
514
506
|
if utility_config.has_key?(package)
|
515
507
|
utility_config[package]
|
516
|
-
else
|
508
|
+
else
|
509
|
+
get("#{utility_key(utility)}_default", DEFAULT_UTILITY_SETUP[utility])
|
517
510
|
end
|
518
511
|
end
|
519
512
|
|
@@ -596,7 +589,7 @@ module Autoproj
|
|
596
589
|
#
|
597
590
|
# This is false by default
|
598
591
|
def prefer_indep_over_os_packages?
|
599
|
-
get(
|
592
|
+
get("prefer_indep_over_os_packages", false)
|
600
593
|
end
|
601
594
|
|
602
595
|
# 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
|