autoproj 1.9.0.rc4 → 1.9.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -9,10 +9,13 @@ bin/autolocate
9
9
  bin/autoproj
10
10
  bin/autoproj-clean
11
11
  bin/autoproj-create-set
12
- bin/autoproj-inspect
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
18
+ bin/autoproj_bootstrap.in
16
19
  bin/autoproj_stress_test
17
20
  lib/autoproj.rb
18
21
  lib/autoproj/autobuild.rb
@@ -42,6 +45,10 @@ test/data/full_manifest.xml
42
45
  test/data/invalid_manifest.xml
43
46
  test/data/test_manifest/autoproj/local/local.autobuild
44
47
  test/data/test_manifest/autoproj/manifest
48
+ test/package_managers/apt-dpkg-status
49
+ test/package_managers/apt-dpkg-status.installed-last
50
+ test/package_managers/apt-dpkg-status.noninstalled-last
51
+ test/package_managers/test_apt_dpkg_manager.rb
45
52
  test/package_managers/test_gem.rb
46
53
  test/test_debian.rb
47
54
  test/test_manifest.rb
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'autoproj'
4
+ require 'autoproj/cmdline'
5
+ Autoproj.silent do
6
+ Autoproj::CmdLine.initialize_root_directory
7
+ Autoproj::CmdLine.initialize_and_load(ARGV)
8
+ end
9
+ Autoproj.export_env_sh
10
+ Autoproj.message "autoproj: updated #{Autoproj.root_dir}/#{Autoproj::ENV_FILENAME}", :green
11
+
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
@@ -51,13 +51,13 @@ packages.each do |name|
51
51
  puts " is directly selected by the manifest via #{selection.to_a.join(", ")}"
52
52
  end
53
53
  else
54
- puts " is not directly selected by the manifest"
54
+ puts " is not directly selected by the manifest"
55
55
  end
56
56
  if Autoproj.manifest.ignored?(pkg_name)
57
- puts " is ignored"
57
+ puts " is ignored"
58
58
  end
59
59
  if Autoproj.manifest.excluded?(pkg_name)
60
- puts " is excluded: #{Autoproj.manifest.exclusion_reason(pkg_name)}"
60
+ puts " is excluded: #{Autoproj.manifest.exclusion_reason(pkg_name)}"
61
61
  end
62
62
 
63
63
  all_reverse_dependencies = Set.new
@@ -0,0 +1,190 @@
1
+ #! /usr/bin/ruby
2
+
3
+ if RUBY_VERSION < "1.8.7"
4
+ STDERR.puts "autoproj requires Ruby >= 1.8.7"
5
+ exit 1
6
+ end
7
+
8
+ require 'set'
9
+ curdir_entries = Dir.entries('.').to_set - [".", "..", "autoproj_bootstrap", ".gems", 'env.sh'].to_set
10
+ if !curdir_entries.empty? && ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] != '1'
11
+ while true
12
+ print "The current directory is not empty, continue bootstrapping anyway ? [yes] "
13
+ STDOUT.flush
14
+ answer = STDIN.readline.chomp
15
+ if answer == "no"
16
+ exit
17
+ elsif answer == "" || answer == "yes"
18
+ # Set the environment variable since we might restart the
19
+ # autoproj_bootstrap script and -- anyway -- will run "autoproj
20
+ # bootstrap" later on
21
+ break
22
+ else
23
+ STDOUT.puts "invalid answer. Please answer 'yes' or 'no'"
24
+ STDOUT.flush
25
+ end
26
+ end
27
+ end
28
+
29
+ # Environment is clean, so just mark it as so unconditionally
30
+ ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] = '1'
31
+
32
+ needed_gem_home = ENV['AUTOPROJ_GEM_HOME'] || "#{Dir.pwd}/.gems"
33
+ if $LOADED_FEATURES.find { |str| str =~ /bygems/ }
34
+ if ENV['GEM_HOME'] != needed_gem_home
35
+ require 'rbconfig'
36
+ RUBY = RbConfig::CONFIG['RUBY_INSTALL_NAME']
37
+
38
+ ENV['GEM_HOME'] = needed_gem_home
39
+ exec RUBY, __FILE__, *ARGV
40
+ end
41
+ end
42
+
43
+
44
+ ENV['GEM_HOME'] = needed_gem_home
45
+ ENV['PATH'] = "#{ENV['GEM_HOME']}/bin:#{ENV['PATH']}"
46
+
47
+ require 'yaml'
48
+ require 'set'
49
+
50
+ module Autoproj
51
+ class ConfigError < RuntimeError; end
52
+ class << self
53
+ attr_reader :verbose
54
+ end
55
+
56
+ def self.color(string, *args)
57
+ string
58
+ end
59
+
60
+ def self.message(str)
61
+ STDERR.puts " #{str}"
62
+ end
63
+ end
64
+
65
+ module Autobuild
66
+ def self.do_update
67
+ true
68
+ end
69
+ def self.message(str)
70
+ STDERR.puts " #{str}"
71
+ end
72
+
73
+ class << self
74
+ attr_reader :programs
75
+ end
76
+ @programs = Hash.new
77
+ def self.tool(name)
78
+ # Let the ability to set programs[name] to nil to make sure we don't use
79
+ # that program. This is used later on in this file to make sure we
80
+ # aren't using the wrong rubygems binary
81
+ if programs.has_key?(name)
82
+ programs[name]
83
+ else
84
+ name
85
+ end
86
+ end
87
+
88
+ module Subprocess
89
+ def self.run(name, phase, *cmd)
90
+ output = `#{cmd.join(" ")}`
91
+ if $?.exitstatus != 0
92
+ STDERR.puts "ERROR: failed to run #{cmd.join(" ")}"
93
+ STDERR.puts "ERROR: command output is: #{output}"
94
+ exit 1
95
+ end
96
+ end
97
+ end
98
+ end
99
+
100
+ OSDEPS_CODE
101
+ OPTIONS_CODE
102
+ SYSTEM_CODE
103
+
104
+ # Override Autoproj.root_dir
105
+ module Autoproj
106
+ def self.root_dir
107
+ @root_dir
108
+ end
109
+ @root_dir = Dir.pwd
110
+ end
111
+
112
+ DEFS = <<EODEFS
113
+ OSDEPS_DEFAULTS
114
+ EODEFS
115
+
116
+ Autoproj::OSDependencies.define_osdeps_mode_option
117
+ osdeps_mode = Autoproj::OSDependencies.osdeps_mode
118
+ ENV['AUTOPROJ_OSDEPS_MODE'] = osdeps_mode
119
+
120
+ # First thing we do is install a proper ruby environment. We make sure that we
121
+ # aren't installing any gems for now (as we need to choose the right gem
122
+ # binary) by setting Autobuild.programs['gem'] to nil
123
+ Autobuild.programs['gem'] = nil
124
+ Autoproj::OSDependencies.autodetect_ruby
125
+
126
+ osdeps_management =
127
+ if ENV['AUTOPROJ_DEFAULT_OSDEPS']
128
+ Autoproj::OSDependencies.load(ENV['AUTOPROJ_DEFAULT_OSDEPS'])
129
+ else
130
+ Autoproj::OSDependencies.new(YAML.load(DEFS))
131
+ end
132
+ osdeps_management.silent = false
133
+
134
+ begin
135
+ STDERR.puts "autoproj: installing a proper Ruby environment (this can take a long time)"
136
+ osdeps_management.install(['ruby'])
137
+ rescue Autoproj::ConfigError => e
138
+ STDERR.puts "failed: #{e.message}"
139
+ exit(1)
140
+ end
141
+
142
+ # Now try to find out the name of the gem binary
143
+ PACKAGES = %w{lsb_release}
144
+
145
+ ENV['RUBYOPT'] = "-rubygems"
146
+ require 'rubygems'
147
+
148
+ STDERR.puts "autoproj: installing autoproj and its dependencies (this can take a long time)"
149
+ # First install the dependencies of autoproj, as we don't want them to be
150
+ # affected by the prerelease flag
151
+ begin
152
+ osdeps_management.install(PACKAGES)
153
+ rescue Autoproj::ConfigError => e
154
+ STDERR.puts "failed: #{e.message}"
155
+ exit(1)
156
+ end
157
+
158
+ File.open('env.sh', 'w') do |io|
159
+ io.write <<-EOSHELL
160
+ export RUBYOPT=-rubygems
161
+ export GEM_PATH=#{needed_gem_home}:$GEM_PATH
162
+ export GEM_HOME=#{needed_gem_home}
163
+ export PATH=$GEM_HOME/bin:$PATH
164
+ EOSHELL
165
+ end
166
+
167
+ # If the user specifies "dev" on the command line, install the prerelease
168
+ # version of autoproj. If it is "localdev", expect him to install autoproj and
169
+ # run autoproj bootstrap manually.
170
+ if ARGV.first != "localdev"
171
+ if ARGV.first == "dev"
172
+ Autoproj::PackageManagers::GemManager.with_prerelease = true
173
+ ARGV.shift
174
+ end
175
+ begin
176
+ osdeps_management.install(['build-essential'])
177
+ osdeps_management.install(['autobuild'])
178
+ osdeps_management.install(['autoproj'])
179
+ rescue Autoproj::ConfigError => e
180
+ STDERR.puts "failed: #{e.message}"
181
+ exit(1)
182
+ end
183
+ Autoproj::PackageManagers::GemManager.with_prerelease = false
184
+
185
+ if !system('autoproj', 'bootstrap', *ARGV)
186
+ STDERR.puts "ERROR: failed to run autoproj bootstrap #{ARGV.join(", ")}"
187
+ exit 1
188
+ end
189
+ end
190
+
@@ -112,10 +112,14 @@ module Autoproj
112
112
 
113
113
  Autoproj.manifest = Manifest.new
114
114
 
115
+ local_source = LocalPackageSet.new(Autoproj.manifest)
116
+
117
+ # Load the user-wide autoproj RC file
118
+ Autoproj.load_if_present(local_source, Dir.home, ".autoprojrc")
119
+
115
120
  # We load the local init.rb first so that the manifest loading
116
121
  # process can use options defined there for the autoproj version
117
122
  # control information (for instance)
118
- local_source = LocalPackageSet.new(Autoproj.manifest)
119
123
  Autoproj.load_if_present(local_source, local_source.local_dir, "init.rb")
120
124
 
121
125
  manifest_path = File.join(Autoproj.config_dir, 'manifest')
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.0.rc4"
2
+ VERSION = "1.9.0.rc5"
3
3
  end
@@ -0,0 +1,41 @@
1
+ Package: noninstalled-package
2
+ Status: bla
3
+ Priority: optional
4
+ Section: unknown
5
+ Installed-Size: 17480
6
+ Maintainer: Ruben Smits
7
+ Architecture: amd64
8
+ Version: 0.2.3-s1336530597~oneiric
9
+ Depends: ros-electric-ros (= 1.6.9-s1336528271~oneiric), ros-electric-common-rosdeps (= 1.0.2-s1336530376~oneiric), build-essential, python-yaml, cmake, subversion, python-sip-dev, libc6, libeigen3-dev, libcppunit-dev, pkg-config
10
+ Description: orocos_kinematics_dynamics
11
+ orocos_kinematics_dynamics
12
+ Wg-Rosdistro: electric
13
+
14
+ Package: installed-package
15
+ Status: install ok installed
16
+ Priority: optional
17
+ Section: x11
18
+ Installed-Size: 114
19
+ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
20
+ Architecture: amd64
21
+ Version: 1:12.9.0-0ubuntu0.1
22
+ Provides: xorg-driver-input
23
+ Depends: libc6 (>= 2.7), xorg-input-abi-16, xserver-xorg-core (>= 2:1.10.99.901), xserver-xorg-input-mouse, udev
24
+ Description: X.Org X server -- VMMouse input driver to use with VMWare
25
+ This package provides the driver for the X11 vmmouse input device.
26
+ .
27
+ The VMMouse driver enables support for the special VMMouse protocol
28
+ that is provided by VMware virtual machines to give absolute pointer
29
+ positioning.
30
+ .
31
+ The vmmouse driver is capable of falling back to the standard "mouse"
32
+ driver if a VMware virtual machine is not detected. This allows for
33
+ dual-booting of an operating system from a virtual machine to real hardware
34
+ without having to edit xorg.conf every time.
35
+ .
36
+ More information about X.Org can be found at:
37
+ <URL:http://www.X.org>
38
+ .
39
+ This package is built from the X.org xf86-input-vmmouse driver module.
40
+ Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
41
+
@@ -0,0 +1,27 @@
1
+ Package: installed-package
2
+ Status: install ok installed
3
+ Priority: optional
4
+ Section: x11
5
+ Installed-Size: 114
6
+ Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
7
+ Architecture: amd64
8
+ Version: 1:12.9.0-0ubuntu0.1
9
+ Provides: xorg-driver-input
10
+ Depends: libc6 (>= 2.7), xorg-input-abi-16, xserver-xorg-core (>= 2:1.10.99.901), xserver-xorg-input-mouse, udev
11
+ Description: X.Org X server -- VMMouse input driver to use with VMWare
12
+ This package provides the driver for the X11 vmmouse input device.
13
+ .
14
+ The VMMouse driver enables support for the special VMMouse protocol
15
+ that is provided by VMware virtual machines to give absolute pointer
16
+ positioning.
17
+ .
18
+ The vmmouse driver is capable of falling back to the standard "mouse"
19
+ driver if a VMware virtual machine is not detected. This allows for
20
+ dual-booting of an operating system from a virtual machine to real hardware
21
+ without having to edit xorg.conf every time.
22
+ .
23
+ More information about X.Org can be found at:
24
+ <URL:http://www.X.org>
25
+ .
26
+ This package is built from the X.org xf86-input-vmmouse driver module.
27
+ Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
@@ -0,0 +1,12 @@
1
+ Package: noninstalled-package
2
+ Status: bla
3
+ Priority: optional
4
+ Section: unknown
5
+ Installed-Size: 17480
6
+ Maintainer: Ruben Smits
7
+ Architecture: amd64
8
+ Version: 0.2.3-s1336530597~oneiric
9
+ Depends: ros-electric-ros (= 1.6.9-s1336528271~oneiric), ros-electric-common-rosdeps (= 1.0.2-s1336530376~oneiric), build-essential, python-yaml, cmake, subversion, python-sip-dev, libc6, libeigen3-dev, libcppunit-dev, pkg-config
10
+ Description: orocos_kinematics_dynamics
11
+ orocos_kinematics_dynamics
12
+ Wg-Rosdistro: electric
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.9.0.rc4
4
+ version: 1.9.0.rc5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild
16
- requirement: &17687980 !ruby/object:Gem::Requirement
16
+ requirement: &22328000 !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: *17687980
24
+ version_requirements: *22328000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: utilrb
27
- requirement: &17686580 !ruby/object:Gem::Requirement
27
+ requirement: &22327540 !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: *17686580
35
+ version_requirements: *22327540
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: highline
38
- requirement: &17685660 !ruby/object:Gem::Requirement
38
+ requirement: &22327080 !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: *17685660
46
+ version_requirements: *22327080
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rdoc
49
- requirement: &17684660 !ruby/object:Gem::Requirement
49
+ requirement: &22326640 !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: *17684660
57
+ version_requirements: *22326640
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hoe
60
- requirement: &17700960 !ruby/object:Gem::Requirement
60
+ requirement: &22326200 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '3.3'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *17700960
68
+ version_requirements: *22326200
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.
@@ -78,10 +78,13 @@ executables:
78
78
  - autoproj
79
79
  - autoproj-clean
80
80
  - autoproj-create-set
81
- - autoproj-inspect
81
+ - autoproj-envsh
82
+ - autoproj-list
82
83
  - autoproj-locate
83
84
  - autoproj-query
85
+ - autoproj-show
84
86
  - autoproj_bootstrap
87
+ - autoproj_bootstrap.in
85
88
  - autoproj_stress_test
86
89
  extensions: []
87
90
  extra_rdoc_files:
@@ -101,10 +104,13 @@ files:
101
104
  - bin/autoproj
102
105
  - bin/autoproj-clean
103
106
  - bin/autoproj-create-set
104
- - bin/autoproj-inspect
107
+ - bin/autoproj-envsh
108
+ - bin/autoproj-list
105
109
  - bin/autoproj-locate
106
110
  - bin/autoproj-query
111
+ - bin/autoproj-show
107
112
  - bin/autoproj_bootstrap
113
+ - bin/autoproj_bootstrap.in
108
114
  - bin/autoproj_stress_test
109
115
  - lib/autoproj.rb
110
116
  - lib/autoproj/autobuild.rb
@@ -134,12 +140,15 @@ files:
134
140
  - test/data/invalid_manifest.xml
135
141
  - test/data/test_manifest/autoproj/local/local.autobuild
136
142
  - test/data/test_manifest/autoproj/manifest
143
+ - test/package_managers/apt-dpkg-status
144
+ - test/package_managers/apt-dpkg-status.installed-last
145
+ - test/package_managers/apt-dpkg-status.noninstalled-last
146
+ - test/package_managers/test_apt_dpkg_manager.rb
137
147
  - test/package_managers/test_gem.rb
138
148
  - test/test_debian.rb
139
149
  - test/test_manifest.rb
140
150
  - test/test_os_dependencies.rb
141
151
  - test/test_package_manifest.rb
142
- - test/package_managers/test_apt_dpkg_manager.rb
143
152
  - .gemtest
144
153
  homepage: http://rock-robotics.org/documentation/autoproj
145
154
  licenses: []