autoproj 1.8.2.rc1 → 1.8.2.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/autoproj +4 -2
- data/bin/autoproj-inspect +53 -13
- data/lib/autoproj/cmdline.rb +4 -0
- data/lib/autoproj/manifest.rb +21 -3
- data/lib/autoproj/version.rb +1 -1
- metadata +11 -11
data/bin/autoproj
CHANGED
@@ -136,11 +136,13 @@ EOTEXT
|
|
136
136
|
#
|
137
137
|
# First do the resolution to get auto-add, finalize the package
|
138
138
|
# configuration, and then re-resolve
|
139
|
-
|
139
|
+
Autoproj.silent do
|
140
|
+
Autoproj::CmdLine.resolve_user_selection(selected_packages)
|
141
|
+
end
|
140
142
|
# Now load the rest of the configuration
|
141
143
|
Autoproj::CmdLine.finalize_package_setup
|
142
144
|
# Finally, filter out exclusions
|
143
|
-
resolved_selected_packages.
|
145
|
+
resolved_selected_packages = Autoproj::CmdLine.resolve_user_selection(selected_packages)
|
144
146
|
|
145
147
|
if !selected_packages.empty?
|
146
148
|
command_line_selection = resolved_selected_packages.dup
|
data/bin/autoproj-inspect
CHANGED
@@ -2,27 +2,67 @@
|
|
2
2
|
|
3
3
|
require 'autoproj'
|
4
4
|
require 'autoproj/cmdline'
|
5
|
-
require 'pp'
|
6
|
-
|
7
5
|
Autoproj.silent = true
|
8
|
-
|
9
|
-
|
6
|
+
Autoproj::CmdLine.initialize_root_directory
|
7
|
+
Autoproj::CmdLine.initialize_and_load(ARGV)
|
10
8
|
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
require 'pp'
|
10
|
+
default_packages = Autoproj.manifest.default_packages
|
11
|
+
revdeps = Autoproj.manifest.compute_revdeps
|
14
12
|
|
15
|
-
|
13
|
+
selected_packages = ARGV.map do |arg|
|
14
|
+
if File.directory?(arg)
|
15
|
+
File.expand_path(arg)
|
16
|
+
else arg
|
17
|
+
end
|
18
|
+
end
|
19
|
+
selected_packages = Autoproj::CmdLine.resolve_user_selection(selected_packages)
|
20
|
+
|
21
|
+
selected_packages.selection.each_key do |name|
|
22
|
+
result = Autoproj.manifest.resolve_package_name(name)
|
23
|
+
packages, osdeps = result.partition { |type, name| type == :package }
|
16
24
|
packages = packages.map(&:last)
|
17
25
|
osdeps = osdeps.map(&:last)
|
18
26
|
|
19
|
-
|
20
|
-
|
21
|
-
|
27
|
+
packages.each do |pkg_name|
|
28
|
+
puts "source package #{pkg_name}"
|
29
|
+
if default_packages.include?(pkg_name)
|
30
|
+
selection = default_packages.selection[pkg_name]
|
31
|
+
selection.delete(pkg_name)
|
32
|
+
if selection.empty?
|
33
|
+
puts " is directly selected by the manifest"
|
34
|
+
else
|
35
|
+
puts " is directly selected by the manifest via #{selection.to_a.join(", ")}"
|
36
|
+
end
|
37
|
+
else
|
38
|
+
puts " is not directly selected by the manifest"
|
39
|
+
end
|
40
|
+
|
41
|
+
all_reverse_dependencies = Set.new
|
42
|
+
pkg_revdeps = revdeps[pkg_name].dup.to_a
|
43
|
+
while !pkg_revdeps.empty?
|
44
|
+
parent_name = pkg_revdeps.shift
|
45
|
+
next if all_reverse_dependencies.include?(parent_name)
|
46
|
+
all_reverse_dependencies << parent_name
|
47
|
+
pkg_revdeps.concat(revdeps[parent_name].to_a)
|
48
|
+
end
|
49
|
+
|
50
|
+
selections = Set.new
|
51
|
+
all_reverse_dependencies = all_reverse_dependencies.to_a.sort
|
52
|
+
all_reverse_dependencies.each do |parent_name|
|
53
|
+
if default_packages.include?(parent_name)
|
54
|
+
selections |= default_packages.selection[parent_name]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
if !selections.empty?
|
58
|
+
puts " selected by way of #{selections.to_a.join(", ")}"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
22
62
|
osdeps.each do |pkg_name|
|
23
|
-
puts "
|
63
|
+
puts "the osdep '#{pkg_name}'"
|
24
64
|
Autoproj.osdeps.resolve_os_dependencies(pkg_name).each do |manager, packages|
|
25
|
-
puts "
|
65
|
+
puts " #{manager.names.first}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
|
26
66
|
end
|
27
67
|
end
|
28
68
|
end
|
data/lib/autoproj/cmdline.rb
CHANGED
data/lib/autoproj/manifest.rb
CHANGED
@@ -1886,11 +1886,12 @@ module Autoproj
|
|
1886
1886
|
|
1887
1887
|
# Returns the set of packages that are selected by the layout
|
1888
1888
|
def all_selected_packages
|
1889
|
-
result =
|
1890
|
-
|
1889
|
+
result = Set.new
|
1890
|
+
root = default_packages.packages.to_set
|
1891
|
+
root.each do |pkg_name|
|
1891
1892
|
Autobuild::Package[pkg_name].all_dependencies(result)
|
1892
1893
|
end
|
1893
|
-
result
|
1894
|
+
result | root
|
1894
1895
|
end
|
1895
1896
|
|
1896
1897
|
# Returns the set of packages that should be built if the user does not
|
@@ -2241,6 +2242,23 @@ module Autoproj
|
|
2241
2242
|
def move_package(package_name, new_dir)
|
2242
2243
|
moved_packages[package_name] = File.join(new_dir, File.basename(package_name))
|
2243
2244
|
end
|
2245
|
+
|
2246
|
+
# Compute the reverse dependencies of all the packages
|
2247
|
+
#
|
2248
|
+
# The return value is a hash of the form
|
2249
|
+
#
|
2250
|
+
# package_name => [list_of_packages_that_depend_on_package_name]
|
2251
|
+
#
|
2252
|
+
# Where the list is given as a list of package names as well
|
2253
|
+
def compute_revdeps
|
2254
|
+
result = Hash.new { |h, k| h[k] = Set.new }
|
2255
|
+
each_autobuild_package do |pkg|
|
2256
|
+
pkg.dependencies.each do |pkg_name|
|
2257
|
+
result[pkg_name] << pkg.name
|
2258
|
+
end
|
2259
|
+
end
|
2260
|
+
result
|
2261
|
+
end
|
2244
2262
|
end
|
2245
2263
|
|
2246
2264
|
class << self
|
data/lib/autoproj/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.2.
|
4
|
+
version: 1.8.2.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-10-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: autobuild
|
16
|
-
requirement: &
|
16
|
+
requirement: &11454720 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.6.0.rc1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *11454720
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: utilrb
|
27
|
-
requirement: &
|
27
|
+
requirement: &11453940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *11453940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: highline
|
38
|
-
requirement: &
|
38
|
+
requirement: &11453060 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.5.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *11453060
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rdoc
|
49
|
-
requirement: &
|
49
|
+
requirement: &11451860 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.10'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *11451860
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: hoe
|
60
|
-
requirement: &
|
60
|
+
requirement: &11450480 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '3.1'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *11450480
|
69
69
|
description: autoproj is a manager for sets of software packages. It allows the user
|
70
70
|
to import and build packages from source, still using the underlying distribution's
|
71
71
|
native package manager for software that is available on it.
|