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 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
- resolved_selected_packages = Autoproj::CmdLine.resolve_user_selection(selected_packages)
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.filter_excluded_and_ignored_packages(Autoproj.manifest)
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
- root_dir = Autoproj::CmdLine.initialize_root_directory
9
- selection = Autoproj::CmdLine.initialize_and_load(ARGV)
6
+ Autoproj::CmdLine.initialize_root_directory
7
+ Autoproj::CmdLine.initialize_and_load(ARGV)
10
8
 
11
- selection.each do |name|
12
- puts "resolved '#{name}' with"
13
- resolved = Autoproj.manifest.resolve_package_name(name)
9
+ require 'pp'
10
+ default_packages = Autoproj.manifest.default_packages
11
+ revdeps = Autoproj.manifest.compute_revdeps
14
12
 
15
- packages, osdeps = resolved.partition { |type, name| type == :package }
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
- puts "#{packages.size} source packages"
20
- puts " " + packages.sort.join("\n ")
21
- puts "#{osdeps.size} OS dependencies"
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 " the osdep '#{pkg_name}'"
63
+ puts "the osdep '#{pkg_name}'"
24
64
  Autoproj.osdeps.resolve_os_dependencies(pkg_name).each do |manager, packages|
25
- puts " #{manager.names.first}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
65
+ puts " #{manager.names.first}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
26
66
  end
27
67
  end
28
68
  end
@@ -14,6 +14,10 @@ module Autoproj
14
14
  @verbose = false
15
15
  @console = HighLine.new
16
16
 
17
+ def self.silent(&block)
18
+ Autobuild.silent(&block)
19
+ end
20
+
17
21
  def self.message(*args)
18
22
  Autobuild.message(*args)
19
23
  end
@@ -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 = default_packages.packages.to_set
1890
- result.each do |pkg_name|
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
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.8.2.rc1"
2
+ VERSION = "1.8.2.rc2"
3
3
  end
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.rc1
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: &5160020 !ruby/object:Gem::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: *5160020
24
+ version_requirements: *11454720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: utilrb
27
- requirement: &5157900 !ruby/object:Gem::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: *5157900
35
+ version_requirements: *11453940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: highline
38
- requirement: &5155740 !ruby/object:Gem::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: *5155740
46
+ version_requirements: *11453060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rdoc
49
- requirement: &5153800 !ruby/object:Gem::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: *5153800
57
+ version_requirements: *11451860
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hoe
60
- requirement: &5169340 !ruby/object:Gem::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: *5169340
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.