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.
- checksums.yaml +4 -4
- data/.gemtest +0 -0
- data/Manifest.txt +27 -21
- data/Rakefile +4 -6
- data/bin/alocate +5 -1
- data/bin/amake +3 -53
- data/bin/aup +3 -50
- data/bin/autoproj +3 -264
- data/bin/autoproj_bootstrap +294 -349
- data/bin/autoproj_bootstrap.in +27 -3
- data/lib/autoproj.rb +23 -1
- data/lib/autoproj/autobuild.rb +51 -89
- data/lib/autoproj/base.rb +0 -9
- data/lib/autoproj/build_option.rb +1 -3
- data/lib/autoproj/cli.rb +1 -0
- data/lib/autoproj/cli/base.rb +155 -0
- data/lib/autoproj/cli/bootstrap.rb +119 -0
- data/lib/autoproj/cli/build.rb +72 -0
- data/lib/autoproj/cli/cache.rb +31 -0
- data/lib/autoproj/cli/clean.rb +37 -0
- data/lib/autoproj/cli/commit.rb +41 -0
- data/lib/autoproj/cli/doc.rb +22 -0
- data/lib/autoproj/cli/envsh.rb +22 -0
- data/lib/autoproj/cli/inspection_tool.rb +73 -0
- data/lib/autoproj/cli/locate.rb +96 -0
- data/lib/autoproj/cli/log.rb +26 -0
- data/lib/autoproj/cli/main.rb +249 -0
- data/lib/autoproj/cli/main_test.rb +57 -0
- data/lib/autoproj/cli/osdeps.rb +30 -0
- data/lib/autoproj/cli/query.rb +43 -0
- data/lib/autoproj/cli/reconfigure.rb +19 -0
- data/lib/autoproj/cli/reset.rb +7 -32
- data/lib/autoproj/cli/show.rb +219 -0
- data/lib/autoproj/cli/snapshot.rb +1 -1
- data/lib/autoproj/cli/status.rb +149 -0
- data/lib/autoproj/cli/switch_config.rb +28 -0
- data/lib/autoproj/cli/tag.rb +9 -35
- data/lib/autoproj/cli/test.rb +34 -55
- data/lib/autoproj/cli/update.rb +158 -0
- data/lib/autoproj/cli/versions.rb +32 -69
- data/lib/autoproj/configuration.rb +95 -34
- data/lib/autoproj/default.osdeps +25 -35
- data/lib/autoproj/environment.rb +85 -63
- data/lib/autoproj/exceptions.rb +50 -0
- data/lib/autoproj/gitorious.rb +11 -9
- data/lib/autoproj/manifest.rb +199 -231
- data/lib/autoproj/metapackage.rb +0 -8
- data/lib/autoproj/ops/build.rb +1 -17
- data/lib/autoproj/ops/configuration.rb +92 -90
- data/lib/autoproj/ops/import.rb +222 -0
- data/lib/autoproj/ops/loader.rb +18 -8
- data/lib/autoproj/ops/main_config_switcher.rb +45 -73
- data/lib/autoproj/ops/snapshot.rb +5 -10
- data/lib/autoproj/ops/tools.rb +10 -44
- data/lib/autoproj/options.rb +35 -6
- data/lib/autoproj/osdeps.rb +97 -68
- data/lib/autoproj/package_selection.rb +39 -20
- data/lib/autoproj/package_set.rb +26 -24
- data/lib/autoproj/reporter.rb +91 -0
- data/lib/autoproj/system.rb +50 -149
- data/lib/autoproj/variable_expansion.rb +32 -6
- data/lib/autoproj/vcs_definition.rb +57 -17
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +550 -0
- data/test/ops/test_snapshot.rb +26 -0
- data/test/test_package.rb +30 -0
- data/test/test_vcs_definition.rb +46 -0
- metadata +55 -50
- data/bin/autolocate +0 -3
- data/bin/autoproj-bootstrap +0 -68
- data/bin/autoproj-cache +0 -18
- data/bin/autoproj-clean +0 -13
- data/bin/autoproj-commit +0 -10
- data/bin/autoproj-create-set +0 -118
- data/bin/autoproj-doc +0 -28
- data/bin/autoproj-envsh +0 -14
- data/bin/autoproj-list +0 -69
- data/bin/autoproj-locate +0 -85
- data/bin/autoproj-log +0 -5
- data/bin/autoproj-query +0 -82
- data/bin/autoproj-reset +0 -13
- data/bin/autoproj-show +0 -192
- data/bin/autoproj-snapshot +0 -27
- data/bin/autoproj-switch-config +0 -24
- data/bin/autoproj-tag +0 -13
- data/bin/autoproj-test +0 -31
- data/bin/autoproj-versions +0 -20
- data/bin/autoproj_stress_test +0 -40
- data/lib/autoproj/cmdline.rb +0 -1649
data/lib/autoproj/ops/loader.rb
CHANGED
@@ -1,15 +1,21 @@
|
|
1
1
|
module Autoproj
|
2
2
|
module Ops
|
3
3
|
class Loader
|
4
|
+
# The path w.r.t. which we should resolve relative paths
|
5
|
+
#
|
6
|
+
# @return [String]
|
7
|
+
attr_reader :root_dir
|
4
8
|
# @return [Array<String>] information about what is being loaded
|
5
9
|
attr_reader :file_stack
|
6
10
|
|
7
|
-
def initialize
|
11
|
+
def initialize(root_dir)
|
12
|
+
@root_dir = root_dir
|
8
13
|
@file_stack = Array.new
|
14
|
+
@loaded_autobuild_files = Set.new
|
9
15
|
end
|
10
16
|
|
11
17
|
def in_package_set(pkg_set, path)
|
12
|
-
@file_stack.push([pkg_set, File.expand_path(path).gsub(/^#{Regexp.quote(
|
18
|
+
@file_stack.push([pkg_set, File.expand_path(path).gsub(/^#{Regexp.quote(root_dir)}\//, '')])
|
13
19
|
yield
|
14
20
|
ensure
|
15
21
|
@file_stack.pop
|
@@ -61,7 +67,7 @@ module Autoproj
|
|
61
67
|
# @param [Array<String>] path
|
62
68
|
def load(pkg_set, *path)
|
63
69
|
path = File.join(*path)
|
64
|
-
in_package_set(pkg_set, File.expand_path(path).gsub(/^#{Regexp.quote(
|
70
|
+
in_package_set(pkg_set, File.expand_path(path).gsub(/^#{Regexp.quote(root_dir)}\//, '')) do
|
65
71
|
begin
|
66
72
|
Kernel.load path
|
67
73
|
rescue Interrupt
|
@@ -83,14 +89,18 @@ module Autoproj
|
|
83
89
|
load(pkg_set, *path)
|
84
90
|
end
|
85
91
|
end
|
92
|
+
|
93
|
+
def import_autobuild_file(package_set, path)
|
94
|
+
return if @loaded_autobuild_files.include?(path)
|
95
|
+
load(package_set, path)
|
96
|
+
@loaded_autobuild_files << path
|
97
|
+
end
|
86
98
|
end
|
87
99
|
|
88
|
-
#
|
89
|
-
#
|
90
|
-
# Note that it is here hopefully temporarily. All the Ops classes should
|
91
|
-
# have their loader object given at construction time
|
100
|
+
# @deprecated use Autoproj.workspace, or better make sure all ops classes
|
101
|
+
# get their own workspace object as argument
|
92
102
|
def self.loader
|
93
|
-
|
103
|
+
Autoproj.workspace
|
94
104
|
end
|
95
105
|
end
|
96
106
|
end
|
@@ -3,10 +3,10 @@ module Autoproj
|
|
3
3
|
# Operations that modify the source of the main configuration (bootstrap
|
4
4
|
# and switch-config)
|
5
5
|
class MainConfigSwitcher
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :ws
|
7
7
|
|
8
|
-
def initialize(
|
9
|
-
@
|
8
|
+
def initialize(ws)
|
9
|
+
@ws = ws
|
10
10
|
end
|
11
11
|
|
12
12
|
# Set of directory entries that are expected to be present in the
|
@@ -25,7 +25,8 @@ module Autoproj
|
|
25
25
|
return if ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] == '1'
|
26
26
|
|
27
27
|
require 'set'
|
28
|
-
curdir_entries = Dir.entries(
|
28
|
+
curdir_entries = Dir.entries(ws.root_dir).map { |p| File.basename(p) }.to_set -
|
29
|
+
EXPECTED_ROOT_ENTRIES
|
29
30
|
return if curdir_entries.empty?
|
30
31
|
|
31
32
|
while true
|
@@ -52,14 +53,14 @@ module Autoproj
|
|
52
53
|
# bootstrap
|
53
54
|
#
|
54
55
|
# AUTOPROJ_CURRENT_ROOT must be set to either the new root
|
55
|
-
# ({root_dir}) or a root that we are reusing
|
56
|
+
# ({ws.root_dir}) or a root that we are reusing
|
56
57
|
#
|
57
58
|
# @param [Array<String>] reuse set of autoproj roots that are being reused
|
58
59
|
# @raise ConfigError
|
59
60
|
def validate_autoproj_current_root(reuse)
|
60
61
|
if current_root = ENV['AUTOPROJ_CURRENT_ROOT']
|
61
62
|
# Allow having a current root only if it is being reused
|
62
|
-
if (current_root != root_dir) && !reuse.include?(current_root)
|
63
|
+
if (current_root != ws.root_dir) && !reuse.include?(current_root)
|
63
64
|
Autoproj.error "the env.sh from #{ENV['AUTOPROJ_CURRENT_ROOT']} seem to already be sourced"
|
64
65
|
Autoproj.error "start a new shell and try to bootstrap again"
|
65
66
|
Autoproj.error ""
|
@@ -70,56 +71,31 @@ module Autoproj
|
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
73
|
-
def handle_bootstrap_options(args)
|
74
|
-
reuse = []
|
75
|
-
parser = OptionParser.new do |opt|
|
76
|
-
opt.on '--reuse [DIR]', "reuse the given autoproj installation (can be given multiple times). If given without arguments, reuse the currently active install (#{ENV['AUTOPROJ_CURRENT_ROOT']})" do |path|
|
77
|
-
path ||= ENV['AUTOPROJ_CURRENT_ROOT']
|
78
|
-
|
79
|
-
path = File.expand_path(path)
|
80
|
-
if !File.directory?(path) || !File.directory?(File.join(path, 'autoproj'))
|
81
|
-
raise ConfigError.new, "#{path} does not look like an autoproj installation"
|
82
|
-
end
|
83
|
-
reuse << path
|
84
|
-
end
|
85
|
-
end
|
86
|
-
Tools.common_options(parser)
|
87
|
-
args = parser.parse(args)
|
88
|
-
return args, reuse
|
89
|
-
end
|
90
|
-
|
91
74
|
MAIN_CONFIGURATION_TEMPLATE = File.expand_path(File.join("..", "..", "..", "samples", 'autoproj'), File.dirname(__FILE__))
|
92
75
|
|
93
|
-
def bootstrap(
|
94
|
-
|
95
|
-
|
96
|
-
validate_autoproj_current_root(reuse)
|
97
|
-
|
98
|
-
Autoproj.root_dir = root_dir
|
99
|
-
Autobuild.prefix = Autoproj.build_dir
|
100
|
-
Autobuild.srcdir = Autoproj.root_dir
|
101
|
-
Autobuild.logdir = File.join(Autobuild.prefix, 'log')
|
76
|
+
def bootstrap(buildconf_info, options = Hash.new)
|
77
|
+
options = validate_options options,
|
78
|
+
reuse: Array.new
|
102
79
|
|
103
|
-
|
104
|
-
|
105
|
-
Autoproj.prepare_environment
|
80
|
+
check_root_dir_empty
|
81
|
+
validate_autoproj_current_root(options[:reuse])
|
106
82
|
|
107
|
-
|
108
|
-
manifest.osdeps.load_default
|
109
|
-
manifest.osdeps.osdeps_mode
|
83
|
+
ws.config.validate_ruby_executable
|
110
84
|
|
111
|
-
|
112
|
-
|
113
|
-
|
85
|
+
PackageManagers::GemManager.with_prerelease(ws.config.use_prerelease?) do
|
86
|
+
ws.osdeps.install(%w{autobuild autoproj})
|
87
|
+
end
|
88
|
+
ws.config.set 'reused_autoproj_installations', options[:reuse], true
|
89
|
+
ws.env.export_env_sh(nil, shell_helpers: ws.config.shell_helpers?)
|
114
90
|
|
115
91
|
# If we are not getting the installation setup from a VCS, copy the template
|
116
92
|
# files
|
117
|
-
if
|
93
|
+
if buildconf_info.empty? || buildconf_info.size == 1
|
118
94
|
FileUtils.cp_r MAIN_CONFIGURATION_TEMPLATE, "autoproj"
|
119
95
|
end
|
120
96
|
|
121
|
-
if
|
122
|
-
manifest_url =
|
97
|
+
if buildconf_info.size == 1 # the user asks us to download a manifest
|
98
|
+
manifest_url = buildconf_info.first
|
123
99
|
Autoproj.message("autoproj: downloading manifest file #{manifest_url}", :bold)
|
124
100
|
manifest_data =
|
125
101
|
begin open(manifest_url) { |file| file.read }
|
@@ -133,20 +109,17 @@ module Autoproj
|
|
133
109
|
io.write(manifest_data)
|
134
110
|
end
|
135
111
|
|
136
|
-
elsif
|
137
|
-
type, url, *options = *
|
112
|
+
elsif buildconf_info.size >= 2 # is a VCS definition for the manifest itself ...
|
113
|
+
type, url, *options = *buildconf_info
|
138
114
|
url = VCSDefinition.to_absolute_url(url, Dir.pwd)
|
139
115
|
do_switch_config(false, type, url, *options)
|
140
116
|
end
|
141
|
-
|
117
|
+
ws.env.export_env_sh(nil, shell_helpers: ws.config.shell_helpers?)
|
118
|
+
ws.config.save
|
142
119
|
end
|
143
120
|
|
144
121
|
def switch_config(*args)
|
145
|
-
|
146
|
-
if Autoproj.has_config_key?('manifest_source')
|
147
|
-
vcs = VCSDefinition.from_raw(Autoproj.user_config('manifest_source'))
|
148
|
-
end
|
149
|
-
|
122
|
+
vcs = ws.config.get('manifest_source', nil)
|
150
123
|
if args.first =~ /^(\w+)=/
|
151
124
|
# First argument is an option string, we are simply setting the
|
152
125
|
# options without changing the type/url
|
@@ -159,17 +132,14 @@ module Autoproj
|
|
159
132
|
url = VCSDefinition.to_absolute_url(url)
|
160
133
|
|
161
134
|
if vcs && (vcs.type == type && vcs.url == url)
|
162
|
-
# Don't need to do much: simply change the options and save the config
|
163
|
-
# file, the VCS handler will take care of the actual switching
|
164
|
-
vcs_def = Autoproj.user_config('manifest_source')
|
165
135
|
options.each do |opt|
|
166
136
|
opt_name, opt_value = opt.split('=')
|
167
|
-
|
137
|
+
vcs[opt_name] = opt_value
|
168
138
|
end
|
169
139
|
# Validate the VCS definition, but save the hash as-is
|
170
|
-
VCSDefinition.from_raw(
|
171
|
-
|
172
|
-
|
140
|
+
VCSDefinition.from_raw(vcs)
|
141
|
+
ws.config.set "manifest_source", vcs.dup, true
|
142
|
+
ws.config.save
|
173
143
|
true
|
174
144
|
|
175
145
|
else
|
@@ -180,13 +150,13 @@ module Autoproj
|
|
180
150
|
|
181
151
|
return if !opt.ask(nil)
|
182
152
|
|
183
|
-
|
184
|
-
do_switch_config(true, type, url, *options)
|
185
|
-
end
|
153
|
+
do_switch_config(true, type, url, *options)
|
186
154
|
false
|
187
155
|
end
|
156
|
+
ws.config.save
|
188
157
|
end
|
189
158
|
|
159
|
+
# @api private
|
190
160
|
def do_switch_config(delete_current, type, url, *options)
|
191
161
|
vcs_def = Hash.new
|
192
162
|
vcs_def[:type] = type
|
@@ -203,13 +173,10 @@ module Autoproj
|
|
203
173
|
vcs = VCSDefinition.from_raw(vcs_def)
|
204
174
|
|
205
175
|
# Install the OS dependencies required for this VCS
|
206
|
-
|
207
|
-
osdeps = Autoproj::OSDependencies.load_default
|
208
|
-
osdeps.osdeps_mode
|
209
|
-
osdeps.install([vcs.type])
|
176
|
+
ws.osdeps.install([vcs.type])
|
210
177
|
|
211
178
|
# Now check out the actual configuration
|
212
|
-
config_dir = File.join(
|
179
|
+
config_dir = File.join(ws.root_dir, "autoproj")
|
213
180
|
if delete_current
|
214
181
|
# Find a backup name for it
|
215
182
|
backup_base_name = backup_name = "#{config_dir}.bak"
|
@@ -221,14 +188,19 @@ module Autoproj
|
|
221
188
|
|
222
189
|
FileUtils.mv config_dir, backup_name
|
223
190
|
end
|
224
|
-
|
191
|
+
|
192
|
+
ops = Ops::Configuration.new(ws)
|
193
|
+
ops.update_configuration_repository(
|
225
194
|
vcs,
|
226
195
|
"autoproj main configuration",
|
227
196
|
config_dir)
|
228
197
|
|
229
|
-
# If the new tree has a configuration file, load it
|
198
|
+
# If the new tree has a configuration file, load it but override
|
199
|
+
# the already known parameters once it is loaded
|
200
|
+
current_config = ws.config
|
230
201
|
# manifest_source
|
231
|
-
|
202
|
+
ws.load_config
|
203
|
+
ws.config.merge(current_config)
|
232
204
|
|
233
205
|
# And now save the options: note that we keep the current option set even
|
234
206
|
# though we switched configuration. This is not a problem as undefined
|
@@ -243,8 +215,8 @@ module Autoproj
|
|
243
215
|
# Validate the option hash, just in case
|
244
216
|
VCSDefinition.from_raw(vcs_def)
|
245
217
|
# Save the new options
|
246
|
-
|
247
|
-
|
218
|
+
ws.config.set "manifest_source", vcs_def.dup, true
|
219
|
+
ws.config.save
|
248
220
|
|
249
221
|
rescue Exception => e
|
250
222
|
Autoproj.error "switching configuration failed: #{e.message}"
|
@@ -165,25 +165,21 @@ module Autoproj
|
|
165
165
|
pkg
|
166
166
|
end
|
167
167
|
|
168
|
-
def import_state_log_ref
|
168
|
+
def self.import_state_log_ref
|
169
169
|
"refs/autoproj"
|
170
170
|
end
|
171
171
|
|
172
172
|
DEFAULT_VERSIONS_FILE_BASENAME = "50-versions.yml"
|
173
173
|
|
174
174
|
def import_state_log_file
|
175
|
-
File.join(OVERRIDES_DIR, DEFAULT_VERSIONS_FILE_BASENAME)
|
175
|
+
File.join(Workspace::OVERRIDES_DIR, DEFAULT_VERSIONS_FILE_BASENAME)
|
176
176
|
end
|
177
177
|
|
178
178
|
def current_import_state
|
179
179
|
main = import_state_log_package
|
180
180
|
# Try to resolve the log ref, and extract the version file from it
|
181
181
|
begin
|
182
|
-
|
183
|
-
if main.importer.nil?
|
184
|
-
return Array.new
|
185
|
-
end
|
186
|
-
yaml = main.importer.show(main, import_state_log_ref, import_state_log_file)
|
182
|
+
yaml = main.importer.show(main, self.class.import_state_log_ref, import_state_log_file)
|
187
183
|
YAML.load(yaml) || Array.new
|
188
184
|
rescue Autobuild::PackageException
|
189
185
|
Array.new
|
@@ -191,7 +187,6 @@ module Autoproj
|
|
191
187
|
end
|
192
188
|
|
193
189
|
def update_package_import_state(name, packages)
|
194
|
-
return if import_state_log_package.importer.nil? #We cannot create states for packages without a importer
|
195
190
|
current_versions = current_import_state
|
196
191
|
if current_versions.empty?
|
197
192
|
# Do a full snapshot this time only
|
@@ -211,13 +206,13 @@ module Autoproj
|
|
211
206
|
main = import_state_log_package
|
212
207
|
git_dir = main.importer.git_dir(main, false)
|
213
208
|
# Ensure that our ref is being logged
|
214
|
-
FileUtils.touch File.join(git_dir, 'logs', *import_state_log_ref.split("/"))
|
209
|
+
FileUtils.touch File.join(git_dir, 'logs', *self.class.import_state_log_ref.split("/"))
|
215
210
|
# Create the commit with the versions info
|
216
211
|
commit_id = Snapshot.create_commit(main, import_state_log_file, name) do |io|
|
217
212
|
YAML.dump(versions, io)
|
218
213
|
end
|
219
214
|
# And save it in our reflog
|
220
|
-
main.importer.run_git_bare(main, "update-ref", '-m', name, import_state_log_ref, commit_id)
|
215
|
+
main.importer.run_git_bare(main, "update-ref", '-m', name, self.class.import_state_log_ref, commit_id)
|
221
216
|
end
|
222
217
|
|
223
218
|
# Create a git commit in which a file contains provided content
|
data/lib/autoproj/ops/tools.rb
CHANGED
@@ -48,26 +48,20 @@ module Autoproj
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def load_autoprojrc
|
51
|
-
|
52
|
-
|
53
|
-
begin Dir.home
|
54
|
-
rescue ArgumentError
|
55
|
-
end
|
56
|
-
|
57
|
-
if home_dir
|
58
|
-
rcfile = File.join(home_dir, '.autoprojrc')
|
59
|
-
if File.file?(rcfile)
|
60
|
-
Kernel.load rcfile
|
61
|
-
end
|
62
|
-
end
|
51
|
+
Autoproj.warn_deprecated __method__, "use workspace.load_autoprojrc instead"
|
52
|
+
Autoproj.workspace.load_autoprojrc
|
63
53
|
end
|
64
54
|
|
65
|
-
def load_main_initrb(
|
66
|
-
|
67
|
-
Autoproj.
|
55
|
+
def load_main_initrb(*args)
|
56
|
+
Autoproj.warn_deprecated __method__, "use workspace.load_main_initrb instead"
|
57
|
+
Autoproj.workspace.load_main_initrb
|
68
58
|
end
|
69
59
|
|
70
60
|
def common_options(parser)
|
61
|
+
parser.on '--silent' do
|
62
|
+
Autoproj.silent = true
|
63
|
+
end
|
64
|
+
|
71
65
|
parser.on '--verbose' do
|
72
66
|
Autoproj.verbose = true
|
73
67
|
Autobuild.verbose = true
|
@@ -83,7 +77,7 @@ module Autoproj
|
|
83
77
|
end
|
84
78
|
|
85
79
|
parser.on("--[no-]color", "enable or disable color in status messages (enabled by default)") do |flag|
|
86
|
-
Autoproj
|
80
|
+
Autoproj.color = flag
|
87
81
|
Autobuild.color = flag
|
88
82
|
end
|
89
83
|
|
@@ -92,34 +86,6 @@ module Autoproj
|
|
92
86
|
end
|
93
87
|
end
|
94
88
|
|
95
|
-
def resolve_selection(user_selection, options = Hash.new)
|
96
|
-
options = Kernel.validate_options options,
|
97
|
-
recursive: true,
|
98
|
-
ignore_non_imported_packages: false
|
99
|
-
|
100
|
-
resolved_selection = CmdLine.
|
101
|
-
resolve_user_selection(user_selection, filter: false)
|
102
|
-
if options[:ignore_non_imported_packages]
|
103
|
-
manifest.each_autobuild_package do |pkg|
|
104
|
-
if !File.directory?(pkg.srcdir)
|
105
|
-
manifest.ignore_package(pkg.name)
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
resolved_selection.filter_excluded_and_ignored_packages(manifest)
|
110
|
-
|
111
|
-
packages =
|
112
|
-
if options[:recursive]
|
113
|
-
CmdLine.import_packages(
|
114
|
-
resolved_selection,
|
115
|
-
warn_about_ignored_packages: false)
|
116
|
-
else
|
117
|
-
resolved_selection.to_a
|
118
|
-
end
|
119
|
-
|
120
|
-
packages
|
121
|
-
end
|
122
|
-
|
123
89
|
extend Tools
|
124
90
|
end
|
125
91
|
end
|
data/lib/autoproj/options.rb
CHANGED
@@ -1,54 +1,83 @@
|
|
1
1
|
module Autoproj
|
2
2
|
# @deprecated use config.override instead
|
3
3
|
def self.override_option(option_name, value)
|
4
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
5
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
4
6
|
config.override(option_name, value)
|
5
7
|
end
|
6
8
|
# @deprecated use config.reset instead
|
7
9
|
def self.reset_option(key)
|
10
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
11
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
8
12
|
config.reset(key)
|
9
13
|
end
|
10
14
|
# @deprecated use config.set(key, value, user_validated) instead
|
11
15
|
def self.change_option(key, value, user_validated = false)
|
16
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
17
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
12
18
|
config.set(key, value, user_validated)
|
13
19
|
end
|
14
20
|
# @deprecated use config.validated_values instead
|
15
21
|
def self.option_set
|
22
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
23
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
16
24
|
config.validated_values
|
17
25
|
end
|
18
26
|
# @deprecated use config.get(key) instead
|
19
27
|
def self.user_config(key)
|
28
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
29
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
20
30
|
config.get(key)
|
21
31
|
end
|
22
32
|
# @deprecated use config.declare(name, type, options, &validator) instead
|
23
33
|
def self.configuration_option(name, type, options, &validator)
|
34
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
35
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
24
36
|
config.declare(name, type, options, &validator)
|
25
37
|
end
|
26
38
|
# @deprecated use config.declared?(name, type, options, &validator) instead
|
27
39
|
def self.declared_option?(name)
|
40
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
41
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
28
42
|
config.declared?(name)
|
29
43
|
end
|
30
44
|
# @deprecated use config.configure(option_name) instead
|
31
45
|
def self.configure(option_name)
|
46
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
47
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
32
48
|
config.configure(option_name)
|
33
49
|
end
|
34
50
|
# @deprecated use config.has_value_for?(name)
|
35
51
|
def self.has_config_key?(name)
|
52
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
53
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
36
54
|
config.has_value_for?(name)
|
37
55
|
end
|
56
|
+
# @deprecated use config.shell_helpers? instead
|
57
|
+
def self.shell_helpers?
|
58
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
59
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
60
|
+
config.shell_helpers?
|
61
|
+
end
|
62
|
+
# @deprecated use config.shell_helpers= instead
|
63
|
+
def self.shell_helpers=(flag)
|
64
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
65
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
66
|
+
config.shell_helpers = flag
|
67
|
+
end
|
38
68
|
|
39
69
|
def self.save_config
|
40
|
-
|
70
|
+
Autoproj.warn "#{__method__} is deprecated, use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
71
|
+
caller.each { |bt| Autoproj.warn " #{bt}" }
|
72
|
+
config.save
|
41
73
|
end
|
42
74
|
|
43
75
|
def self.config
|
44
|
-
|
76
|
+
workspace.config
|
45
77
|
end
|
46
78
|
|
47
79
|
def self.load_config
|
48
|
-
|
49
|
-
if File.exists?(config_file)
|
50
|
-
config.load(config_file, reconfigure?)
|
51
|
-
end
|
80
|
+
workspace.load_config
|
52
81
|
end
|
53
82
|
|
54
83
|
class << self
|