autoproj 1.9.2 → 1.9.3.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -10,8 +10,10 @@ bin/autoproj
10
10
  bin/autoproj-clean
11
11
  bin/autoproj-create-set
12
12
  bin/autoproj-envsh
13
+ bin/autoproj-list
13
14
  bin/autoproj-locate
14
15
  bin/autoproj-query
16
+ bin/autoproj-show
15
17
  bin/autoproj_bootstrap
16
18
  bin/autoproj_bootstrap.in
17
19
  bin/autoproj_stress_test
data/bin/autoproj CHANGED
@@ -18,7 +18,15 @@ def color(*args)
18
18
  Autoproj.color(*args)
19
19
  end
20
20
 
21
+ if defined? Encoding # This is a 1.9-only thing
22
+ Encoding.default_internal = Encoding::UTF_8
23
+ Encoding.default_external = Encoding::UTF_8
24
+ end
21
25
  Autoproj::OSDependencies.autodetect_ruby
26
+ if defined? Encoding # This is a 1.9-only thing
27
+ Encoding.default_internal = Encoding::UTF_8
28
+ Encoding.default_external = Encoding::UTF_8
29
+ end
22
30
 
23
31
  # Check the first element of ARGV. If a tool called autoproj-VALUE exists, just
24
32
  # pass the hand to it
data/bin/autoproj-list ADDED
@@ -0,0 +1,68 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'autoproj'
4
+ require 'autoproj/cmdline'
5
+
6
+ Autoproj.silent do
7
+ Autoproj::CmdLine.initialize_root_directory
8
+ Autoproj::CmdLine.initialize_and_load(ARGV)
9
+ end
10
+ manifest = Autoproj.manifest
11
+
12
+ # Load the manifest for packages that are already present on the
13
+ # file system
14
+ manifest.packages.each_value do |pkg|
15
+ if File.directory?(pkg.autobuild.srcdir)
16
+ manifest.load_package_manifest(pkg.autobuild.name)
17
+ end
18
+ end
19
+
20
+ all_packages = Hash.new
21
+ package_sets = manifest.each_package_set.to_a
22
+ package_sets.each do |pkg_set|
23
+ pkg_set.each_package.each do |pkg|
24
+ all_packages[pkg.name] = [pkg, pkg_set.name]
25
+ end
26
+ end
27
+
28
+ metapackages = manifest.metapackages.values
29
+
30
+ if package_sets.empty?
31
+ Autoproj.message("autoproj: no package sets defined in autoproj/manifest", :bold, :red)
32
+ exit(0)
33
+ end
34
+
35
+ Autoproj.message
36
+ Autoproj.message("autoproj: package sets", :bold)
37
+ package_sets.sort_by(&:name).each do |pkg_set|
38
+ next if pkg_set.empty?
39
+ if pkg_set.imported_from
40
+ Autoproj.message " #{pkg_set.name} (imported by #{pkg_set.imported_from.name})"
41
+ else
42
+ Autoproj.message " #{pkg_set.name} (listed in manifest)"
43
+ end
44
+ end
45
+
46
+ Autoproj.message
47
+ Autoproj.message("autoproj: metapackages", :bold)
48
+ metapackages.sort_by(&:name).each do |metap|
49
+ Autoproj.message " #{metap.name}"
50
+ end
51
+
52
+ packages_not_present = []
53
+
54
+ Autoproj.message
55
+ Autoproj.message("autoproj: packages", :bold)
56
+ all_packages.to_a.sort_by(&:first).map(&:last).each do |pkg, pkg_set|
57
+ if File.exists?(File.join(pkg.srcdir, "manifest.xml"))
58
+ manifest.load_package_manifest(pkg.name)
59
+ manifest.resolve_optional_dependencies
60
+ end
61
+
62
+ pkg_manifest = pkg.description
63
+ if File.directory?(pkg.srcdir)
64
+ Autoproj.message " #{pkg.name}#{": #{pkg_manifest.short_documentation}" if pkg_manifest && pkg_manifest.short_documentation}"
65
+ else
66
+ Autoproj.message " #{pkg.name}: not yet checked out", :magenta
67
+ end
68
+ end
data/bin/autoproj-show ADDED
@@ -0,0 +1,102 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'autoproj'
4
+ require 'autoproj/cmdline'
5
+ Autoproj.silent = true
6
+ Autoproj::CmdLine.initialize_root_directory
7
+ Autoproj::CmdLine.initialize_and_load(ARGV)
8
+
9
+ require 'pp'
10
+ default_packages = Autoproj.manifest.default_packages
11
+ revdeps = Autoproj.manifest.compute_revdeps
12
+
13
+ user_selection = ARGV.map do |arg|
14
+ if File.directory?(arg)
15
+ File.expand_path(arg)
16
+ else arg
17
+ end
18
+ end
19
+ resolved_selection = Autoproj::CmdLine.resolve_user_selection(user_selection, :filter => false)
20
+ packages = resolved_selection.selection.keys
21
+
22
+ def find_selection_path(from, to)
23
+ path = [from]
24
+ if from == to
25
+ return path
26
+ end
27
+
28
+ Autobuild::Package[from].dependencies.each do |dep_pkg_name|
29
+ if result = find_selection_path(dep_pkg_name, to)
30
+ return path + result
31
+ end
32
+ end
33
+ nil
34
+ end
35
+
36
+ packages.each do |name|
37
+ result = Autoproj.manifest.resolve_package_name(name, :filter => false)
38
+ packages, osdeps = result.partition { |type, name| type == :package }
39
+ packages = packages.map(&:last)
40
+ osdeps = osdeps.map(&:last)
41
+
42
+ packages.each do |pkg_name|
43
+ puts "source package #{pkg_name}"
44
+ if default_packages.include?(pkg_name)
45
+ selection = default_packages.selection[pkg_name]
46
+ if selection.include?(pkg_name) && selection.size == 1
47
+ puts " is directly selected by the manifest"
48
+ else
49
+ selection = selection.dup
50
+ selection.delete(pkg_name)
51
+ puts " is directly selected by the manifest via #{selection.to_a.join(", ")}"
52
+ end
53
+ else
54
+ puts " is not directly selected by the manifest"
55
+ end
56
+ if Autoproj.manifest.ignored?(pkg_name)
57
+ puts " is ignored"
58
+ end
59
+ if Autoproj.manifest.excluded?(pkg_name)
60
+ puts " is excluded: #{Autoproj.manifest.exclusion_reason(pkg_name)}"
61
+ end
62
+
63
+ all_reverse_dependencies = Set.new
64
+ pkg_revdeps = revdeps[pkg_name].dup.to_a
65
+ while !pkg_revdeps.empty?
66
+ parent_name = pkg_revdeps.shift
67
+ next if all_reverse_dependencies.include?(parent_name)
68
+ all_reverse_dependencies << parent_name
69
+ pkg_revdeps.concat(revdeps[parent_name].to_a)
70
+ end
71
+ if all_reverse_dependencies.empty?
72
+ puts " no reverse dependencies"
73
+ else
74
+ puts " reverse dependencies: #{all_reverse_dependencies.sort.join(", ")}"
75
+ end
76
+
77
+ selections = Set.new
78
+ all_reverse_dependencies = all_reverse_dependencies.to_a.sort
79
+ all_reverse_dependencies.each do |parent_name|
80
+ if default_packages.include?(parent_name)
81
+ selections |= default_packages.selection[parent_name]
82
+ end
83
+ end
84
+
85
+ if !selections.empty?
86
+ puts " selected by way of"
87
+ selections.each do |root_pkg|
88
+ path = find_selection_path(root_pkg, pkg_name)
89
+ puts " #{path.join(">")}"
90
+ end
91
+ end
92
+ puts " directly depends on: #{Autobuild::Package[pkg_name].dependencies.sort.join(", ")}"
93
+ end
94
+
95
+ osdeps.each do |pkg_name|
96
+ puts "the osdep '#{pkg_name}'"
97
+ Autoproj.osdeps.resolve_os_dependencies(pkg_name).each do |manager, packages|
98
+ puts " #{manager.names.first}: #{packages.map { |*subnames| subnames.join(" ") }.join(", ")}"
99
+ end
100
+ end
101
+ end
102
+
@@ -521,7 +521,13 @@ fi
521
521
  if !installed.empty? && Autobuild.do_update
522
522
  # Look if we can update the package ...
523
523
  dep = Gem::Dependency.new(name, version_requirements)
524
- available = gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
524
+ available =
525
+ if gem_fetcher.respond_to?(:find_matching)
526
+ gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
527
+ else
528
+ dep.prerelease = GemManager.with_prerelease
529
+ gem_fetcher.search_for_dependency(dep).first
530
+ end
525
531
  installed_version = installed.map(&:version).max
526
532
  available_version = available.map { |(name, v), source| v }.max
527
533
  if !available_version
@@ -489,7 +489,7 @@ def ruby_package(options)
489
489
 
490
490
  if pkg.rake_setup_task && File.file?(File.join(pkg.srcdir, 'Rakefile'))
491
491
  Autobuild::Subprocess.run pkg, 'post-install',
492
- 'rake', pkg.rake_setup_task, :working_directory => pkg.srcdir
492
+ Autoproj::CmdLine.ruby_executable, Autoproj.find_in_path('rake'), pkg.rake_setup_task, :working_directory => pkg.srcdir
493
493
  end
494
494
  end
495
495
  end
@@ -502,7 +502,7 @@ def ruby_package(options)
502
502
  if !pkg.has_doc? && pkg.rake_doc_task
503
503
  pkg.doc_task do
504
504
  pkg.progress_start "generating documentation for %s", :done_message => 'generated documentation for %s' do
505
- Autobuild::Subprocess.run pkg, 'doc', 'rake', pkg.rake_doc_task, :working_directory => pkg.srcdir
505
+ Autobuild::Subprocess.run pkg, 'doc', Autoproj::CmdLine.ruby_executable, Autoproj.find_in_path('rake'), pkg.rake_doc_task, :working_directory => pkg.srcdir
506
506
  end
507
507
  end
508
508
  end
@@ -42,11 +42,15 @@ module Autoproj
42
42
  end
43
43
 
44
44
  module CmdLine
45
+ class << self
46
+ attr_reader :ruby_executable
47
+ end
48
+
45
49
  def self.handle_ruby_version
46
50
  ruby = RbConfig::CONFIG['RUBY_INSTALL_NAME']
47
51
  ruby_bindir = RbConfig::CONFIG['bindir']
48
52
 
49
- ruby_executable = File.join(ruby_bindir, ruby)
53
+ @ruby_executable = File.join(ruby_bindir, ruby)
50
54
  if Autoproj.has_config_key?('ruby_executable')
51
55
  expected = Autoproj.user_config('ruby_executable')
52
56
  if expected != ruby_executable
@@ -404,7 +404,13 @@ fi
404
404
  if !installed.empty? && Autobuild.do_update
405
405
  # Look if we can update the package ...
406
406
  dep = Gem::Dependency.new(name, version_requirements)
407
- available = gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
407
+ available =
408
+ if gem_fetcher.respond_to?(:find_matching)
409
+ gem_fetcher.find_matching(dep, true, true, GemManager.with_prerelease)
410
+ else
411
+ dep.prerelease = GemManager.with_prerelease
412
+ gem_fetcher.search_for_dependency(dep).first
413
+ end
408
414
  installed_version = installed.map(&:version).max
409
415
  available_version = available.map { |(name, v), source| v }.max
410
416
  if !available_version
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.2"
2
+ VERSION = "1.9.3.rc1"
3
3
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
5
- prerelease:
4
+ version: 1.9.3.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rock Core Developers
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-15 00:00:00.000000000 Z
12
+ date: 2013-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild
16
- requirement: &4895520 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 1.7.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *4895520
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.7.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: utilrb
27
- requirement: &4893460 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 1.6.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *4893460
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.6.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: highline
38
- requirement: &4907420 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: 1.5.0
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *4907420
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.5.0
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rdoc
49
- requirement: &4905660 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,18 +69,28 @@ dependencies:
54
69
  version: '3.10'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *4905660
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '3.10'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: hoe
60
- requirement: &4904220 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ~>
64
84
  - !ruby/object:Gem::Version
65
- version: '3.5'
85
+ version: '3.4'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *4904220
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '3.4'
69
94
  description: autoproj is a manager for sets of software packages. It allows the user
70
95
  to import and build packages from source, still using the underlying distribution's
71
96
  native package manager for software that is available on it.
@@ -79,8 +104,10 @@ executables:
79
104
  - autoproj-clean
80
105
  - autoproj-create-set
81
106
  - autoproj-envsh
107
+ - autoproj-list
82
108
  - autoproj-locate
83
109
  - autoproj-query
110
+ - autoproj-show
84
111
  - autoproj_bootstrap
85
112
  - autoproj_bootstrap.in
86
113
  - autoproj_stress_test
@@ -103,8 +130,10 @@ files:
103
130
  - bin/autoproj-clean
104
131
  - bin/autoproj-create-set
105
132
  - bin/autoproj-envsh
133
+ - bin/autoproj-list
106
134
  - bin/autoproj-locate
107
135
  - bin/autoproj-query
136
+ - bin/autoproj-show
108
137
  - bin/autoproj_bootstrap
109
138
  - bin/autoproj_bootstrap.in
110
139
  - bin/autoproj_stress_test
@@ -163,19 +192,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
192
  required_rubygems_version: !ruby/object:Gem::Requirement
164
193
  none: false
165
194
  requirements:
166
- - - ! '>='
195
+ - - ! '>'
167
196
  - !ruby/object:Gem::Version
168
- version: '0'
197
+ version: 1.3.1
169
198
  requirements: []
170
199
  rubyforge_project: autobuild
171
- rubygems_version: 1.8.11
200
+ rubygems_version: 1.8.23
172
201
  signing_key:
173
202
  specification_version: 3
174
203
  summary: Easy installation and management of sets of software packages
175
204
  test_files:
205
+ - test/test_os_dependencies.rb
206
+ - test/test_debian.rb
176
207
  - test/test_manifest.rb
177
208
  - test/package_managers/test_apt_dpkg_manager.rb
178
209
  - test/package_managers/test_gem.rb
179
- - test/test_debian.rb
180
210
  - test/test_package_manifest.rb
181
- - test/test_os_dependencies.rb