autoproj 2.0.0.rc37 → 2.0.0.rc38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/Rakefile +1 -1
- data/bin/autoproj_bootstrap +34 -2
- data/bin/autoproj_bootstrap.in +4 -2
- data/bin/autoproj_install +34 -2
- data/bin/autoproj_install.in +4 -2
- data/lib/autoproj.rb +9 -2
- data/lib/autoproj/autobuild.rb +13 -742
- data/lib/autoproj/autobuild_extensions/archive_importer.rb +44 -0
- data/lib/autoproj/autobuild_extensions/dsl.rb +439 -0
- data/lib/autoproj/autobuild_extensions/git.rb +116 -0
- data/lib/autoproj/autobuild_extensions/package.rb +159 -0
- data/lib/autoproj/autobuild_extensions/svn.rb +11 -0
- data/lib/autoproj/cli/base.rb +17 -18
- data/lib/autoproj/cli/clean.rb +1 -2
- data/lib/autoproj/cli/envsh.rb +1 -2
- data/lib/autoproj/cli/inspection_tool.rb +12 -21
- data/lib/autoproj/cli/locate.rb +130 -73
- data/lib/autoproj/cli/main.rb +31 -5
- data/lib/autoproj/cli/main_plugin.rb +79 -0
- data/lib/autoproj/cli/main_test.rb +19 -5
- data/lib/autoproj/cli/osdeps.rb +1 -2
- data/lib/autoproj/cli/patcher.rb +21 -0
- data/lib/autoproj/cli/query.rb +34 -41
- data/lib/autoproj/cli/show.rb +121 -52
- data/lib/autoproj/cli/status.rb +4 -5
- data/lib/autoproj/cli/tag.rb +1 -1
- data/lib/autoproj/cli/test.rb +7 -6
- data/lib/autoproj/cli/update.rb +8 -22
- data/lib/autoproj/cli/versions.rb +1 -2
- data/lib/autoproj/configuration.rb +1 -1
- data/lib/autoproj/environment.rb +2 -7
- data/lib/autoproj/exceptions.rb +10 -8
- data/lib/autoproj/find_workspace.rb +46 -12
- data/lib/autoproj/installation_manifest.rb +34 -25
- data/lib/autoproj/local_package_set.rb +86 -0
- data/lib/autoproj/manifest.rb +448 -503
- data/lib/autoproj/metapackage.rb +31 -5
- data/lib/autoproj/ops/configuration.rb +46 -45
- data/lib/autoproj/ops/import.rb +150 -60
- data/lib/autoproj/ops/install.rb +25 -1
- data/lib/autoproj/ops/loader.rb +4 -1
- data/lib/autoproj/ops/main_config_switcher.rb +4 -4
- data/lib/autoproj/ops/snapshot.rb +4 -3
- data/lib/autoproj/os_package_installer.rb +105 -46
- data/lib/autoproj/os_package_resolver.rb +63 -36
- data/lib/autoproj/package_definition.rb +1 -0
- data/lib/autoproj/package_managers/apt_dpkg_manager.rb +30 -27
- data/lib/autoproj/package_managers/bundler_manager.rb +64 -18
- data/lib/autoproj/package_managers/gem_manager.rb +4 -2
- data/lib/autoproj/package_managers/manager.rb +26 -7
- data/lib/autoproj/package_managers/shell_script_manager.rb +4 -4
- data/lib/autoproj/package_managers/zypper_manager.rb +1 -1
- data/lib/autoproj/package_manifest.rb +154 -137
- data/lib/autoproj/package_selection.rb +16 -2
- data/lib/autoproj/package_set.rb +352 -309
- data/lib/autoproj/query.rb +13 -1
- data/lib/autoproj/system.rb +2 -2
- data/lib/autoproj/test.rb +164 -11
- data/lib/autoproj/variable_expansion.rb +15 -42
- data/lib/autoproj/vcs_definition.rb +93 -76
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +116 -80
- metadata +10 -2
data/lib/autoproj/cli/osdeps.rb
CHANGED
@@ -6,8 +6,7 @@ class OSDeps < InspectionTool
|
|
6
6
|
def run(user_selection, options = Hash.new)
|
7
7
|
initialize_and_load
|
8
8
|
_, osdep_packages, resolved_selection, _ =
|
9
|
-
finalize_setup(user_selection
|
10
|
-
ignore_non_imported_packages: true)
|
9
|
+
finalize_setup(user_selection)
|
11
10
|
|
12
11
|
options = Kernel.validate_options options,
|
13
12
|
update: true,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'autoproj/cli/inspection_tool'
|
2
|
+
module Autoproj
|
3
|
+
module CLI
|
4
|
+
# Interface to patch/unpatch a package
|
5
|
+
class Patcher < InspectionTool
|
6
|
+
def run(packages, patch: true)
|
7
|
+
initialize_and_load
|
8
|
+
packages, _ = finalize_setup(packages, recursive: false, non_imported_packages: nil)
|
9
|
+
packages.each do |package_name|
|
10
|
+
pkg = ws.manifest.package_definition_by_name(package_name)
|
11
|
+
if patch
|
12
|
+
pkg.autobuild.importer.patch(pkg.autobuild)
|
13
|
+
else
|
14
|
+
pkg.autobuild.importer.patch(pkg.autobuild, [])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
data/lib/autoproj/cli/query.rb
CHANGED
@@ -4,62 +4,55 @@
|
|
4
4
|
module Autoproj
|
5
5
|
module CLI
|
6
6
|
class Query < InspectionTool
|
7
|
-
def
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
all_selected_packages = all_selected_packages.to_set
|
12
|
-
|
13
|
-
query =
|
14
|
-
if !query_string.empty?
|
15
|
-
Autoproj::Query.parse_query(query_string.first)
|
7
|
+
def find_all_matches(query, packages)
|
8
|
+
matches = packages.map do |pkg|
|
9
|
+
if priority = query.match(pkg)
|
10
|
+
[priority, pkg]
|
16
11
|
end
|
12
|
+
end.compact
|
13
|
+
matches.sort_by { |priority, pkg| [priority, pkg.name] }
|
14
|
+
end
|
17
15
|
|
18
|
-
|
19
|
-
|
16
|
+
def run(query_string, format: '$NAME', search_all: false, only_present: false)
|
17
|
+
initialize_and_load
|
18
|
+
all_selected_packages, * = finalize_setup([], non_imported_packages: :return)
|
19
|
+
if search_all
|
20
|
+
packages = ws.manifest.each_package_definition.to_a
|
20
21
|
else
|
21
22
|
packages = all_selected_packages.map do |pkg_name|
|
22
|
-
|
23
|
+
ws.manifest.find_package_definition(pkg_name)
|
23
24
|
end
|
24
|
-
packages += ws.manifest.all_selected_packages.map do |pkg_name|
|
25
|
-
if !all_selected_packages.include?(pkg_name)
|
26
|
-
[pkg_name, ws.manifest.find_package(pkg_name)]
|
27
|
-
end
|
28
|
-
end.compact
|
29
25
|
end
|
30
|
-
|
31
|
-
|
32
|
-
packages = packages.find_all do |_, pkg|
|
26
|
+
if only_present
|
27
|
+
packages = packages.find_all do |pkg|
|
33
28
|
File.directory?(pkg.autobuild.srcdir)
|
34
29
|
end
|
35
30
|
end
|
36
31
|
|
37
|
-
if
|
38
|
-
|
32
|
+
if query_string.empty?
|
33
|
+
query = Autoproj::Query.all
|
39
34
|
else
|
40
|
-
|
41
|
-
if priority = query.match(pkg_def)
|
42
|
-
[priority, name]
|
43
|
-
end
|
44
|
-
end.compact
|
35
|
+
query = Autoproj::Query.parse_query(query_string.first)
|
45
36
|
end
|
37
|
+
matches = find_all_matches(query, packages)
|
46
38
|
|
47
|
-
|
48
|
-
|
49
|
-
matches.each do |priority, name|
|
50
|
-
pkg_def = ws.manifest.find_package(name)
|
51
|
-
pkg = ws.manifest.find_autobuild_package(name)
|
52
|
-
fields['SRCDIR'] = pkg.srcdir
|
53
|
-
fields['PREFIX'] = pkg.prefix
|
54
|
-
fields['NAME'] = name
|
55
|
-
fields['PRIORITY'] = priority
|
56
|
-
fields['URL'] = (pkg_def.vcs.url if pkg_def.vcs)
|
57
|
-
fields['PRESENT'] = File.directory?(pkg.srcdir)
|
58
|
-
|
59
|
-
value = Autoproj.expand(options[:format] || "$NAME", fields)
|
60
|
-
puts value
|
39
|
+
matches.each do |priority, pkg_def|
|
40
|
+
puts format_package(format, priority, pkg_def)
|
61
41
|
end
|
62
42
|
end
|
43
|
+
|
44
|
+
def format_package(format, priority, package)
|
45
|
+
autobuild_package = package.autobuild
|
46
|
+
fields = Hash.new
|
47
|
+
fields['SRCDIR'] = autobuild_package.srcdir
|
48
|
+
fields['BUILDDIR'] = autobuild_package.builddir
|
49
|
+
fields['PREFIX'] = autobuild_package.prefix
|
50
|
+
fields['NAME'] = package.name
|
51
|
+
fields['PRIORITY'] = priority
|
52
|
+
fields['URL'] = (package.vcs.url if package.vcs)
|
53
|
+
fields['PRESENT'] = File.directory?(autobuild_package.srcdir)
|
54
|
+
Autoproj.expand(format, fields)
|
55
|
+
end
|
63
56
|
end
|
64
57
|
end
|
65
58
|
end
|
data/lib/autoproj/cli/show.rb
CHANGED
@@ -4,31 +4,89 @@
|
|
4
4
|
module Autoproj
|
5
5
|
module CLI
|
6
6
|
class Show < InspectionTool
|
7
|
-
def run(user_selection,
|
8
|
-
|
9
|
-
mainline: false, env: false
|
10
|
-
|
11
|
-
initialize_and_load(mainline: options.delete(:mainline))
|
7
|
+
def run(user_selection, short: false, recursive: false, mainline: false, env: false)
|
8
|
+
initialize_and_load(mainline: mainline)
|
12
9
|
default_packages = ws.manifest.default_packages
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
# Filter out selections that match package set names
|
12
|
+
package_set_names, user_selection = user_selection.partition do |name|
|
13
|
+
ws.manifest.find_package_set(name)
|
14
|
+
end
|
15
|
+
|
16
|
+
if !user_selection.empty? || package_set_names.empty?
|
17
|
+
source_packages, osdep_packages, * =
|
18
|
+
finalize_setup(user_selection, recursive: recursive, non_imported_packages: :return)
|
19
|
+
else
|
20
|
+
source_packages, osdep_packages = Array.new, Array.new
|
21
|
+
end
|
18
22
|
|
19
|
-
if source_packages.empty? && osdep_packages.empty?
|
20
|
-
Autoproj.error "no packages or OS packages match #{user_selection.join(" ")}"
|
23
|
+
if package_set_names.empty? && source_packages.empty? && osdep_packages.empty?
|
24
|
+
Autoproj.error "no package set, packages or OS packages match #{user_selection.join(" ")}"
|
21
25
|
return
|
26
|
+
elsif !source_packages.empty? || !osdep_packages.empty?
|
27
|
+
load_all_available_package_manifests
|
28
|
+
revdeps = ws.manifest.compute_revdeps
|
29
|
+
end
|
30
|
+
|
31
|
+
package_set_names = package_set_names.sort
|
32
|
+
source_packages = source_packages.sort
|
33
|
+
osdep_packages = osdep_packages.sort
|
34
|
+
|
35
|
+
if short
|
36
|
+
package_set_names.each do |name|
|
37
|
+
puts "pkg_set #{name}"
|
38
|
+
end
|
39
|
+
source_packages.each do |name|
|
40
|
+
puts "pkg #{name}"
|
41
|
+
end
|
42
|
+
osdep_packages.each do |name|
|
43
|
+
puts "osdep #{name}"
|
44
|
+
end
|
45
|
+
else
|
46
|
+
package_set_names.each do |pkg_set_name|
|
47
|
+
display_package_set(pkg_set_name)
|
48
|
+
end
|
49
|
+
source_packages.each do |pkg_name|
|
50
|
+
display_source_package(pkg_name, default_packages, revdeps, env: env)
|
51
|
+
end
|
52
|
+
osdep_packages.each do |pkg_name|
|
53
|
+
display_osdep_package(pkg_name, default_packages, revdeps)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def display_package_set(name, package_per_line: 8)
|
59
|
+
puts Autoproj.color("package set #{name}", :bold)
|
60
|
+
pkg_set = ws.manifest.find_package_set(name)
|
61
|
+
if !File.directory?(pkg_set.raw_local_dir)
|
62
|
+
puts Autobuild.color(" this package set is not checked out", :magenta)
|
63
|
+
end
|
64
|
+
if overrides_key = pkg_set.vcs.overrides_key
|
65
|
+
puts " overrides key: pkg_set:#{overrides_key}"
|
22
66
|
end
|
23
|
-
|
24
|
-
|
67
|
+
if pkg_set.raw_local_dir != pkg_set.user_local_dir
|
68
|
+
puts " checkout dir: #{pkg_set.raw_local_dir}"
|
69
|
+
puts " symlinked to: #{pkg_set.user_local_dir}"
|
70
|
+
else
|
71
|
+
puts " path: #{pkg_set.raw_local_dir}"
|
72
|
+
end
|
73
|
+
|
74
|
+
puts " version control information:"
|
75
|
+
display_vcs(pkg_set.vcs)
|
25
76
|
|
26
|
-
|
27
|
-
|
77
|
+
metapackage = ws.manifest.find_metapackage(name)
|
78
|
+
size = metapackage.size
|
79
|
+
if size == 0
|
80
|
+
puts " does not have any packages"
|
81
|
+
else
|
82
|
+
puts " refers to #{metapackage.size} package#{'s' if metapackage.size > 1}"
|
28
83
|
end
|
29
|
-
|
30
|
-
|
84
|
+
names = metapackage.each_package.map(&:name).sort
|
85
|
+
package_lines = names.each_slice(package_per_line).map do |*line_names|
|
86
|
+
line_names.join(", ")
|
31
87
|
end
|
88
|
+
puts " " + package_lines.join(",\n ")
|
89
|
+
|
32
90
|
end
|
33
91
|
|
34
92
|
def display_source_package(pkg_name, default_packages, revdeps, options = Hash.new)
|
@@ -39,24 +97,53 @@ def display_source_package(pkg_name, default_packages, revdeps, options = Hash.n
|
|
39
97
|
end
|
40
98
|
puts " source definition"
|
41
99
|
ws.manifest.load_package_manifest(pkg_name)
|
42
|
-
vcs = ws.manifest.
|
100
|
+
vcs = ws.manifest.find_package_definition(pkg_name).vcs
|
101
|
+
|
102
|
+
display_vcs(vcs)
|
103
|
+
display_common_information(pkg_name, default_packages, revdeps)
|
104
|
+
|
105
|
+
puts " directly depends on: #{pkg.dependencies.sort.join(", ")}"
|
106
|
+
puts " optionally depends on: #{pkg.optional_dependencies.sort.join(", ")}"
|
107
|
+
puts " dependencies on OS packages: #{pkg.os_packages.sort.join(", ")}"
|
108
|
+
if options[:env]
|
109
|
+
puts " environment"
|
110
|
+
pkg.resolved_env.sort_by(&:first).each do |name, v|
|
111
|
+
values = v.split(File::PATH_SEPARATOR)
|
112
|
+
if values.size == 1
|
113
|
+
puts " #{name}: #{values.first}"
|
114
|
+
else
|
115
|
+
puts " #{name}:"
|
116
|
+
values.each do |single_v|
|
117
|
+
puts " #{single_v}"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
43
123
|
|
124
|
+
def display_vcs(vcs)
|
44
125
|
fragments = []
|
45
|
-
if
|
126
|
+
if vcs.none?
|
46
127
|
fragments << ["has no VCS definition", []]
|
47
|
-
|
128
|
+
else
|
48
129
|
first = true
|
49
130
|
fragments << [nil, vcs_to_array(vcs)]
|
50
|
-
vcs.raw.each do |
|
51
|
-
|
52
|
-
|
131
|
+
vcs.raw.each do |entry|
|
132
|
+
entry_name =
|
133
|
+
if entry.package_set && entry.file
|
134
|
+
"#{entry.package_set.name} (#{entry.file})"
|
135
|
+
elsif entry.package_set
|
136
|
+
"#{entry.package_set.name}"
|
137
|
+
elsif entry.file
|
138
|
+
"#{entry.file}"
|
139
|
+
end
|
53
140
|
|
54
141
|
title = if first
|
55
|
-
"first match: in #{
|
56
|
-
else "overriden in #{
|
142
|
+
"first match: in #{entry_name}"
|
143
|
+
else "overriden in #{entry_name}"
|
57
144
|
end
|
58
145
|
first = false
|
59
|
-
fragments << [title, vcs_to_array(
|
146
|
+
fragments << [title, vcs_to_array(entry.vcs)]
|
60
147
|
end
|
61
148
|
end
|
62
149
|
fragments.each do |title, elements|
|
@@ -71,26 +158,6 @@ def display_source_package(pkg_name, default_packages, revdeps, options = Hash.n
|
|
71
158
|
end
|
72
159
|
end
|
73
160
|
end
|
74
|
-
|
75
|
-
display_common_information(pkg_name, default_packages, revdeps)
|
76
|
-
|
77
|
-
puts " directly depends on: #{pkg.dependencies.sort.join(", ")}"
|
78
|
-
puts " optionally depends on: #{pkg.optional_dependencies.sort.join(", ")}"
|
79
|
-
puts " dependencies on OS packages: #{pkg.os_packages.sort.join(", ")}"
|
80
|
-
if options[:env]
|
81
|
-
puts " environment"
|
82
|
-
pkg.resolved_env.sort_by(&:first).each do |name, v|
|
83
|
-
values = v.split(File::PATH_SEPARATOR)
|
84
|
-
if values.size == 1
|
85
|
-
puts " #{name}: #{values.first}"
|
86
|
-
else
|
87
|
-
puts " #{name}:"
|
88
|
-
values.each do |single_v|
|
89
|
-
puts " #{single_v}"
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
161
|
end
|
95
162
|
|
96
163
|
def display_osdep_package(pkg_name, default_packages, revdeps)
|
@@ -160,7 +227,9 @@ def find_selection_path(from, to)
|
|
160
227
|
end
|
161
228
|
|
162
229
|
all_paths = Array.new
|
163
|
-
ws.manifest.
|
230
|
+
ws.manifest.resolve_package_name(from).each do |pkg_type, pkg_name|
|
231
|
+
next if pkg_type != :package
|
232
|
+
|
164
233
|
path = if pkg_name == from then []
|
165
234
|
else [pkg_name]
|
166
235
|
end
|
@@ -201,15 +270,15 @@ def vcs_to_array(vcs)
|
|
201
270
|
url = vcs.url
|
202
271
|
end
|
203
272
|
|
204
|
-
|
273
|
+
fields = []
|
205
274
|
if type
|
206
|
-
|
275
|
+
fields << ['type', type]
|
207
276
|
end
|
208
277
|
if url
|
209
|
-
|
278
|
+
fields << ['url', url]
|
210
279
|
end
|
211
|
-
|
212
|
-
|
280
|
+
fields = fields.concat(options.to_a.sort_by { |k, _| k.to_s })
|
281
|
+
fields.map do |key, value|
|
213
282
|
if value.respond_to?(:to_str) && File.file?(value) && value =~ /^\//
|
214
283
|
value = Pathname.new(value).relative_path_from(Pathname.new(Autoproj.root_dir))
|
215
284
|
end
|
data/lib/autoproj/cli/status.rb
CHANGED
@@ -5,8 +5,8 @@ module CLI
|
|
5
5
|
class Status < InspectionTool
|
6
6
|
def validate_options(packages, options)
|
7
7
|
packages, options = super
|
8
|
-
if options[:
|
9
|
-
options[:
|
8
|
+
if options[:deps].nil? && packages.empty?
|
9
|
+
options[:deps] = true
|
10
10
|
end
|
11
11
|
return packages, options
|
12
12
|
end
|
@@ -15,8 +15,7 @@ def run(user_selection, options = Hash.new)
|
|
15
15
|
initialize_and_load(mainline: options[:mainline])
|
16
16
|
packages, *, config_selected = finalize_setup(
|
17
17
|
user_selection,
|
18
|
-
recursive: options[:
|
19
|
-
ignore_non_imported_packages: true)
|
18
|
+
recursive: options[:deps])
|
20
19
|
|
21
20
|
if options[:config].nil?
|
22
21
|
options[:config] = user_selection.empty? || config_selected
|
@@ -42,7 +41,7 @@ def run(user_selection, options = Hash.new)
|
|
42
41
|
|
43
42
|
Autoproj.message("autoproj: displaying status of packages", :bold)
|
44
43
|
packages = packages.sort.map do |pkg_name|
|
45
|
-
ws.manifest.
|
44
|
+
ws.manifest.find_package_definition(pkg_name)
|
46
45
|
end
|
47
46
|
display_status(packages, parallel: options[:parallel], snapshot: options[:snapshot], only_local: options[:only_local])
|
48
47
|
end
|
data/lib/autoproj/cli/tag.rb
CHANGED
@@ -9,7 +9,7 @@ class Tag < Base
|
|
9
9
|
def run(arguments, options = Hash.new)
|
10
10
|
tag_name, *user_selection = *arguments
|
11
11
|
ws.load_config
|
12
|
-
main_package_set = LocalPackageSet.new(ws
|
12
|
+
main_package_set = LocalPackageSet.new(ws)
|
13
13
|
|
14
14
|
pkg = main_package_set.create_autobuild_package
|
15
15
|
importer = pkg.importer
|
data/lib/autoproj/cli/test.rb
CHANGED
@@ -12,7 +12,7 @@ def enable(user_selection, options = Hash.new)
|
|
12
12
|
selection, _ = finalize_setup(
|
13
13
|
user_selection,
|
14
14
|
recursive: options[:deps],
|
15
|
-
|
15
|
+
non_imported_packages: :return)
|
16
16
|
ws.config.utility_enable('test', *selection)
|
17
17
|
end
|
18
18
|
ws.config.save
|
@@ -27,7 +27,7 @@ def disable(user_selection, options = Hash.new)
|
|
27
27
|
selection, _ = finalize_setup(
|
28
28
|
user_selection,
|
29
29
|
recursive: options[:deps],
|
30
|
-
|
30
|
+
non_imported_packages: :return)
|
31
31
|
ws.config.utility_disable('test', *selection)
|
32
32
|
end
|
33
33
|
ws.config.save
|
@@ -37,12 +37,12 @@ def list(user_selection, options = Hash.new)
|
|
37
37
|
initialize_and_load
|
38
38
|
resolved_selection, _ = finalize_setup(
|
39
39
|
user_selection,
|
40
|
-
recursive: options[:
|
41
|
-
|
40
|
+
recursive: options[:deps],
|
41
|
+
non_imported_packages: :return)
|
42
42
|
|
43
43
|
lines = Array.new
|
44
44
|
resolved_selection.each do |pkg_name|
|
45
|
-
pkg = ws.manifest.
|
45
|
+
pkg = ws.manifest.find_package_definition(pkg_name).autobuild
|
46
46
|
lines << [pkg.name, pkg.test_utility.enabled?, pkg.test_utility.available?]
|
47
47
|
end
|
48
48
|
lines = lines.sort_by { |name, _| name }
|
@@ -56,7 +56,8 @@ def list(user_selection, options = Hash.new)
|
|
56
56
|
|
57
57
|
def run(user_selection, options = Hash.new)
|
58
58
|
initialize_and_load
|
59
|
-
packages, _ = finalize_setup(user_selection
|
59
|
+
packages, _ = finalize_setup(user_selection,
|
60
|
+
recursive: options[:deps])
|
60
61
|
|
61
62
|
packages.each do |pkg|
|
62
63
|
Autobuild::Package[pkg].disable_phases('import', 'prepare', 'install')
|
data/lib/autoproj/cli/update.rb
CHANGED
@@ -13,7 +13,7 @@ def validate_options(packages, options)
|
|
13
13
|
end
|
14
14
|
|
15
15
|
if from = options[:from]
|
16
|
-
options[:from] = Autoproj::InstallationManifest.
|
16
|
+
options[:from] = Autoproj::InstallationManifest.from_workspace_root(options[:from])
|
17
17
|
end
|
18
18
|
ws.os_package_installer.filter_uptodate_packages = options[:osdeps_filter_uptodate]
|
19
19
|
|
@@ -109,21 +109,6 @@ def run(selected_packages, options)
|
|
109
109
|
osdeps_options[:osdeps_mode] = options[:osdeps_mode]
|
110
110
|
end
|
111
111
|
|
112
|
-
if options[:osdeps]
|
113
|
-
# Install the osdeps for the version control
|
114
|
-
vcs_to_install = Set.new
|
115
|
-
selected_packages.each_source_package_name do |pkg_name|
|
116
|
-
if pkg = ws.manifest.find_package(pkg_name)
|
117
|
-
if pkg.vcs
|
118
|
-
vcs_to_install << pkg.vcs.type
|
119
|
-
end
|
120
|
-
else
|
121
|
-
raise "cannot find package #{pkg_name}"
|
122
|
-
end
|
123
|
-
end
|
124
|
-
ws.install_os_packages(vcs_to_install, osdeps_options)
|
125
|
-
end
|
126
|
-
|
127
112
|
ops = Autoproj::Ops::Import.new(ws)
|
128
113
|
source_packages, osdep_packages =
|
129
114
|
ops.import_packages(selected_packages,
|
@@ -133,13 +118,14 @@ def run(selected_packages, options)
|
|
133
118
|
recursive: options[:deps],
|
134
119
|
ignore_errors: options[:keep_going],
|
135
120
|
parallel: parallel,
|
136
|
-
retry_count: options[:retry_count]
|
121
|
+
retry_count: options[:retry_count],
|
122
|
+
install_vcs_packages: (osdeps_options if options[:osdeps]))
|
137
123
|
|
138
124
|
ws.finalize_setup
|
139
125
|
ws.export_installation_manifest
|
140
126
|
|
141
127
|
if options[:osdeps] && !osdep_packages.empty?
|
142
|
-
ws.install_os_packages(osdep_packages, osdeps_options)
|
128
|
+
ws.install_os_packages(osdep_packages, **osdeps_options)
|
143
129
|
end
|
144
130
|
|
145
131
|
ws.export_env_sh(source_packages)
|
@@ -151,14 +137,14 @@ def run(selected_packages, options)
|
|
151
137
|
def load_all_available_package_manifests
|
152
138
|
# Load the manifest for packages that are already present on the
|
153
139
|
# file system
|
154
|
-
ws.manifest.
|
155
|
-
if
|
140
|
+
ws.manifest.each_autobuild_package do |pkg|
|
141
|
+
if pkg.checked_out?
|
156
142
|
begin
|
157
|
-
ws.manifest.load_package_manifest(pkg.
|
143
|
+
ws.manifest.load_package_manifest(pkg.name)
|
158
144
|
rescue Interrupt
|
159
145
|
raise
|
160
146
|
rescue Exception => e
|
161
|
-
Autoproj.warn "cannot load package manifest for #{pkg.
|
147
|
+
Autoproj.warn "cannot load package manifest for #{pkg.name}: #{e.message}"
|
162
148
|
end
|
163
149
|
end
|
164
150
|
end
|