autoproj 1.7.14 → 1.7.15.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +19 -0
- data/Rakefile +0 -6
- data/bin/amake +1 -0
- data/bin/aup +1 -0
- data/bin/autoproj_bootstrap +59 -20
- data/lib/autoproj/cmdline.rb +7 -7
- data/lib/autoproj/manifest.rb +92 -26
- data/lib/autoproj/osdeps.rb +58 -19
- data/lib/autoproj/version.rb +1 -1
- data/test/test_package_manifest.rb +65 -0
- metadata +21 -79
data/History.txt
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
= Version 1.7.15
|
|
2
|
+
* remove dependency on nokogiri. This is the first step in an effort to make
|
|
3
|
+
autoproj as straightforward to bootstrap as possible.
|
|
4
|
+
* gracefully handle multiple autoproj instances trying to access the OS
|
|
5
|
+
packaging system concurrently. A message is now issued that one has to wait
|
|
6
|
+
for the other to finish. This is critical for build servers.
|
|
7
|
+
* allow conditional loading of osdeps file. The system works by adding suffixes
|
|
8
|
+
to Autoproj::OSDependencies.suffixes which tune what files to load. As an
|
|
9
|
+
example, autoproj's handling of Ruby adds either the ruby18 or ruby19 suffix,
|
|
10
|
+
which leads to either loading
|
|
11
|
+
|
|
12
|
+
file.osdeps-ruby18
|
|
13
|
+
|
|
14
|
+
or
|
|
15
|
+
|
|
16
|
+
file.osdeps-ruby19
|
|
17
|
+
|
|
18
|
+
after a file.osdeps "normal" file gets loaded.
|
|
19
|
+
|
|
1
20
|
= Version 1.7.14
|
|
2
21
|
* fix support for local package sets, i.e. package sets that are saved in
|
|
3
22
|
autoproj/directory_name and are part of the main configuration VCS.
|
data/Rakefile
CHANGED
|
@@ -16,14 +16,8 @@ Utilrb::Rake.hoe do
|
|
|
16
16
|
|
|
17
17
|
extra_deps <<
|
|
18
18
|
['autobuild', '>= 1.5.33'] <<
|
|
19
|
-
['rmail', '>= 1.0.0'] <<
|
|
20
19
|
['utilrb', '>= 1.3.3'] <<
|
|
21
|
-
['nokogiri', '>= 1.3.3'] <<
|
|
22
20
|
['highline', '>= 1.5.0']
|
|
23
|
-
|
|
24
|
-
extra_dev_deps <<
|
|
25
|
-
['webgen', '>= 0.5.9'] <<
|
|
26
|
-
['rdoc', '>= 2.4.0']
|
|
27
21
|
end
|
|
28
22
|
end
|
|
29
23
|
end
|
data/bin/amake
CHANGED
|
@@ -49,6 +49,7 @@ if remaining.grep(/^-/).size == remaining.size && !build_all
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
remaining.unshift mode
|
|
52
|
+
ORIGINAL_ARGV = ARGV.dup # This is used in case autoproj needs to update itself
|
|
52
53
|
ARGV.clear
|
|
53
54
|
ARGV.concat(remaining)
|
|
54
55
|
load File.expand_path('autoproj', File.dirname(__FILE__))
|
data/bin/aup
CHANGED
|
@@ -41,6 +41,7 @@ if remaining.grep(/^-/).size == remaining.size && !build_all
|
|
|
41
41
|
end
|
|
42
42
|
remaining.unshift 'update'
|
|
43
43
|
|
|
44
|
+
ORIGINAL_ARGV = ARGV.dup # This is used in case autoproj needs to update itself
|
|
44
45
|
ARGV.clear
|
|
45
46
|
ARGV.concat(remaining)
|
|
46
47
|
load File.expand_path('autoproj', File.dirname(__FILE__))
|
data/bin/autoproj_bootstrap
CHANGED
|
@@ -100,16 +100,41 @@ end
|
|
|
100
100
|
require 'tempfile'
|
|
101
101
|
module Autoproj
|
|
102
102
|
class OSDependencies
|
|
103
|
+
class << self
|
|
104
|
+
# When requested to load a file called X.Y, the osdeps code will
|
|
105
|
+
# also look for files called X-suffix.Y, where 'suffix' is an
|
|
106
|
+
# element in +osdeps_suffixes+
|
|
107
|
+
#
|
|
108
|
+
# A usage of this functionality is to make loading conditional to
|
|
109
|
+
# the available version of certain tools, namely Ruby. Autoproj for
|
|
110
|
+
# instance adds ruby18 when started on Ruby 1.8 and ruby19 when
|
|
111
|
+
# started on Ruby 1.9
|
|
112
|
+
attr_reader :suffixes
|
|
113
|
+
end
|
|
114
|
+
@suffixes = []
|
|
115
|
+
|
|
103
116
|
def self.load(file)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
if !File.file?(file)
|
|
118
|
+
raise ArgumentError, "no such file or directory #{file}"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
candidates = [file]
|
|
122
|
+
candidates.concat(suffixes.map { |s| "#{file}-#{s}" })
|
|
123
|
+
|
|
124
|
+
result = OSDependencies.new
|
|
125
|
+
candidates.each do |file|
|
|
126
|
+
next if !File.file?(file)
|
|
127
|
+
file = File.expand_path(file)
|
|
128
|
+
begin
|
|
129
|
+
data = YAML.load(File.read(file)) || Hash.new
|
|
130
|
+
verify_definitions(data)
|
|
131
|
+
rescue ArgumentError => e
|
|
132
|
+
raise ConfigError.new, "error in #{file}: #{e.message}", e.backtrace
|
|
133
|
+
end
|
|
111
134
|
|
|
112
|
-
|
|
135
|
+
result.merge(OSDependencies.new(data, file))
|
|
136
|
+
end
|
|
137
|
+
result
|
|
113
138
|
end
|
|
114
139
|
|
|
115
140
|
class << self
|
|
@@ -128,13 +153,16 @@ module Autoproj
|
|
|
128
153
|
@aliases[new_name] = old_name
|
|
129
154
|
end
|
|
130
155
|
|
|
156
|
+
def self.ruby_version_keyword
|
|
157
|
+
if RUBY_VERSION < "1.9.0" then "ruby18"
|
|
158
|
+
else "ruby19"
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
131
162
|
def self.autodetect_ruby
|
|
132
|
-
|
|
133
|
-
if RUBY_VERSION < "1.9.0" then "ruby18"
|
|
134
|
-
else "ruby19"
|
|
135
|
-
end
|
|
136
|
-
self.alias(ruby_package, "ruby")
|
|
163
|
+
self.alias(ruby_version_keyword, "ruby")
|
|
137
164
|
end
|
|
165
|
+
self.suffixes << ruby_version_keyword
|
|
138
166
|
|
|
139
167
|
AUTOPROJ_OSDEPS = File.join(File.expand_path(File.dirname(__FILE__)), 'default.osdeps')
|
|
140
168
|
def self.load_default
|
|
@@ -1030,12 +1058,23 @@ So, what do you want ? (all, ruby, os or none)
|
|
|
1030
1058
|
Autoproj.progress shell_script
|
|
1031
1059
|
end
|
|
1032
1060
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1061
|
+
File.open('/tmp/autoproj_osdeps_lock', 'w') do |lock_io|
|
|
1062
|
+
begin
|
|
1063
|
+
while !lock_io.flock(File::LOCK_EX | File::LOCK_NB)
|
|
1064
|
+
Autoproj.progress " waiting for other autoproj instances to finish their osdeps installation"
|
|
1065
|
+
sleep 5
|
|
1066
|
+
end
|
|
1067
|
+
|
|
1068
|
+
Tempfile.open('osdeps_sh') do |io|
|
|
1069
|
+
io.puts "#! /bin/bash"
|
|
1070
|
+
io.puts GAIN_ROOT_ACCESS
|
|
1071
|
+
io.write shell_script
|
|
1072
|
+
io.flush
|
|
1073
|
+
Autobuild::Subprocess.run 'autoproj', 'osdeps', '/bin/bash', io.path
|
|
1074
|
+
end
|
|
1075
|
+
ensure
|
|
1076
|
+
lock_io.flock(File::LOCK_UN)
|
|
1077
|
+
end
|
|
1039
1078
|
end
|
|
1040
1079
|
did_something = true
|
|
1041
1080
|
end
|
|
@@ -1588,7 +1627,7 @@ rescue Autoproj::ConfigError => e
|
|
|
1588
1627
|
end
|
|
1589
1628
|
|
|
1590
1629
|
# Now try to find out the name of the gem binary
|
|
1591
|
-
PACKAGES = %w{
|
|
1630
|
+
PACKAGES = %w{lsb_release}
|
|
1592
1631
|
|
|
1593
1632
|
ENV['RUBYOPT'] = "-rubygems"
|
|
1594
1633
|
require 'rubygems'
|
data/lib/autoproj/cmdline.rb
CHANGED
|
@@ -165,7 +165,11 @@ module Autoproj
|
|
|
165
165
|
ENV['AUTOPROJ_RESTARTING'] = '1'
|
|
166
166
|
require 'rbconfig'
|
|
167
167
|
ruby = RbConfig::CONFIG['RUBY_INSTALL_NAME']
|
|
168
|
-
|
|
168
|
+
if defined?(ORIGINAL_ARGV)
|
|
169
|
+
exec(ruby, $0, *ORIGINAL_ARGV)
|
|
170
|
+
else
|
|
171
|
+
exec(ruby, $0, *ARGV)
|
|
172
|
+
end
|
|
169
173
|
end
|
|
170
174
|
end
|
|
171
175
|
|
|
@@ -484,14 +488,10 @@ module Autoproj
|
|
|
484
488
|
if selected_packages.empty?
|
|
485
489
|
return manifest.default_packages
|
|
486
490
|
end
|
|
487
|
-
if selected_packages.empty? # no packages, terminate
|
|
488
|
-
Autoproj.progress
|
|
489
|
-
Autoproj.progress("autoproj: no packages defined", :red)
|
|
490
|
-
exit 0
|
|
491
|
-
end
|
|
492
491
|
selected_packages = selected_packages.to_set
|
|
493
492
|
|
|
494
|
-
selected_packages, nonresolved = manifest.
|
|
493
|
+
selected_packages, nonresolved = manifest.
|
|
494
|
+
expand_package_selection(selected_packages)
|
|
495
495
|
|
|
496
496
|
# Try to auto-add stuff if nonresolved
|
|
497
497
|
nonresolved.delete_if do |sel|
|
data/lib/autoproj/manifest.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'yaml'
|
|
2
2
|
require 'utilrb/kernel/options'
|
|
3
|
-
require 'nokogiri'
|
|
4
3
|
require 'set'
|
|
4
|
+
require 'rexml/document'
|
|
5
5
|
|
|
6
6
|
module Autoproj
|
|
7
7
|
@build_system_dependencies = Set.new
|
|
@@ -1631,6 +1631,24 @@ module Autoproj
|
|
|
1631
1631
|
result
|
|
1632
1632
|
end
|
|
1633
1633
|
|
|
1634
|
+
# Resolves all the source-based dependencies of this package (excluding
|
|
1635
|
+
# the OS dependencies). The result is returned as a set of package
|
|
1636
|
+
# names.
|
|
1637
|
+
def resolve_packages_dependencies(*root_names)
|
|
1638
|
+
result = Set.new
|
|
1639
|
+
queue = root_names.dup
|
|
1640
|
+
while pkg_name = queue.shift
|
|
1641
|
+
next if result.include?(pkg_name)
|
|
1642
|
+
result << pkg_name
|
|
1643
|
+
|
|
1644
|
+
pkg = Autobuild::Package[pkg_name]
|
|
1645
|
+
pkg.dependencies.each do |dep_name|
|
|
1646
|
+
queue << dep_name
|
|
1647
|
+
end
|
|
1648
|
+
end
|
|
1649
|
+
result
|
|
1650
|
+
end
|
|
1651
|
+
|
|
1634
1652
|
# Resolves a package name, where +name+ cannot be resolved as a
|
|
1635
1653
|
# metapackage
|
|
1636
1654
|
#
|
|
@@ -2050,8 +2068,10 @@ module Autoproj
|
|
|
2050
2068
|
packages = all_layout_packages.
|
|
2051
2069
|
find_all { |pkg_name| pkg_name =~ match_pkg_name }.
|
|
2052
2070
|
to_set
|
|
2053
|
-
|
|
2054
|
-
|
|
2071
|
+
if !packages.empty?
|
|
2072
|
+
matches[sel] = packages
|
|
2073
|
+
expanded_packages |= packages
|
|
2074
|
+
end
|
|
2055
2075
|
|
|
2056
2076
|
each_metapackage do |pkg|
|
|
2057
2077
|
if pkg.name =~ match_pkg_name
|
|
@@ -2141,11 +2161,19 @@ module Autoproj
|
|
|
2141
2161
|
osdeps
|
|
2142
2162
|
end
|
|
2143
2163
|
|
|
2164
|
+
# Access to the information contained in a package's manifest.xml file
|
|
2165
|
+
#
|
|
2166
|
+
# Use PackageManifest.load to create
|
|
2144
2167
|
class PackageManifest
|
|
2168
|
+
# Load a manifest.xml file and returns the corresponding
|
|
2169
|
+
# PackageManifest object
|
|
2145
2170
|
def self.load(package, file)
|
|
2146
|
-
doc =
|
|
2147
|
-
|
|
2148
|
-
|
|
2171
|
+
doc =
|
|
2172
|
+
begin REXML::Document.new(File.read(file))
|
|
2173
|
+
rescue REXML::ParseException => e
|
|
2174
|
+
raise ConfigError, "invalid #{file}: #{e.message}"
|
|
2175
|
+
end
|
|
2176
|
+
|
|
2149
2177
|
PackageManifest.new(package, doc)
|
|
2150
2178
|
end
|
|
2151
2179
|
|
|
@@ -2160,30 +2188,25 @@ module Autoproj
|
|
|
2160
2188
|
# contain multiple comma-separated tags
|
|
2161
2189
|
def tags
|
|
2162
2190
|
result = []
|
|
2163
|
-
xml.
|
|
2164
|
-
result.concat(node.
|
|
2191
|
+
xml.elements.each('package/tags') do |node|
|
|
2192
|
+
result.concat(node.text.strip.split(','))
|
|
2165
2193
|
end
|
|
2166
2194
|
result
|
|
2167
2195
|
end
|
|
2168
2196
|
|
|
2169
2197
|
def documentation
|
|
2170
|
-
xml.
|
|
2171
|
-
doc = node.
|
|
2172
|
-
if doc.empty?
|
|
2173
|
-
if doc = short_documentation
|
|
2174
|
-
return doc
|
|
2175
|
-
end
|
|
2176
|
-
return "no documentation available for #{package.name} in its manifest.xml file"
|
|
2177
|
-
else
|
|
2198
|
+
xml.elements.each('package/description') do |node|
|
|
2199
|
+
doc = node.text.strip
|
|
2200
|
+
if !doc.empty?
|
|
2178
2201
|
return doc
|
|
2179
2202
|
end
|
|
2180
2203
|
end
|
|
2181
|
-
|
|
2204
|
+
return short_documentation
|
|
2182
2205
|
end
|
|
2183
2206
|
|
|
2184
2207
|
def short_documentation
|
|
2185
|
-
xml.
|
|
2186
|
-
doc = node['brief']
|
|
2208
|
+
xml.elements.each('package/description') do |node|
|
|
2209
|
+
doc = node.attributes['brief']
|
|
2187
2210
|
if doc
|
|
2188
2211
|
doc = doc.to_s.strip
|
|
2189
2212
|
end
|
|
@@ -2191,7 +2214,7 @@ module Autoproj
|
|
|
2191
2214
|
return doc.to_s
|
|
2192
2215
|
end
|
|
2193
2216
|
end
|
|
2194
|
-
|
|
2217
|
+
"no documentation available for #{package.name} in its manifest.xml file"
|
|
2195
2218
|
end
|
|
2196
2219
|
|
|
2197
2220
|
def initialize(package, doc)
|
|
@@ -2210,8 +2233,8 @@ module Autoproj
|
|
|
2210
2233
|
|
|
2211
2234
|
def each_os_dependency
|
|
2212
2235
|
if block_given?
|
|
2213
|
-
xml.
|
|
2214
|
-
yield(node['name'], false)
|
|
2236
|
+
xml.elements.each('package/rosdep') do |node|
|
|
2237
|
+
yield(node.attributes['name'], false)
|
|
2215
2238
|
end
|
|
2216
2239
|
package.os_packages.each do |name|
|
|
2217
2240
|
yield(name, false)
|
|
@@ -2223,12 +2246,12 @@ module Autoproj
|
|
|
2223
2246
|
|
|
2224
2247
|
def each_package_dependency
|
|
2225
2248
|
if block_given?
|
|
2226
|
-
depend_nodes = xml.
|
|
2227
|
-
xml.
|
|
2249
|
+
depend_nodes = xml.elements.to_a('package/depend') +
|
|
2250
|
+
xml.elements.to_a('package/depend_optional')
|
|
2228
2251
|
|
|
2229
2252
|
depend_nodes.each do |node|
|
|
2230
|
-
dependency = node['package']
|
|
2231
|
-
optional = (node['optional'].to_s == '1' || node.name == "depend_optional")
|
|
2253
|
+
dependency = node.attributes['package']
|
|
2254
|
+
optional = (node.attributes['optional'].to_s == '1' || node.name == "depend_optional")
|
|
2232
2255
|
|
|
2233
2256
|
if dependency
|
|
2234
2257
|
yield(dependency, optional)
|
|
@@ -2240,6 +2263,49 @@ module Autoproj
|
|
|
2240
2263
|
enum_for :each_package_dependency
|
|
2241
2264
|
end
|
|
2242
2265
|
end
|
|
2266
|
+
|
|
2267
|
+
# Enumerates the name and email of each author. If no email is present,
|
|
2268
|
+
# yields (name, nil)
|
|
2269
|
+
def each_author
|
|
2270
|
+
if !block_given?
|
|
2271
|
+
return enum_for(:each_author)
|
|
2272
|
+
end
|
|
2273
|
+
|
|
2274
|
+
xml.elements.each('package/author') do |author|
|
|
2275
|
+
author.text.strip.split(',').each do |str|
|
|
2276
|
+
name, email = str.split('/').map(&:strip)
|
|
2277
|
+
email = nil if email && email.empty?
|
|
2278
|
+
yield(name, email)
|
|
2279
|
+
end
|
|
2280
|
+
end
|
|
2281
|
+
end
|
|
2282
|
+
|
|
2283
|
+
# If +name+ points to a text element in the XML document, returns the
|
|
2284
|
+
# content of that element. If no element matches +name+, or if the
|
|
2285
|
+
# content is empty, returns nil
|
|
2286
|
+
def text_node(name)
|
|
2287
|
+
xml.elements.each(name) do |str|
|
|
2288
|
+
str = str.text.strip
|
|
2289
|
+
if !str.empty?
|
|
2290
|
+
return str
|
|
2291
|
+
end
|
|
2292
|
+
end
|
|
2293
|
+
nil
|
|
2294
|
+
end
|
|
2295
|
+
|
|
2296
|
+
# The package associated URL, usually meant to direct to a website
|
|
2297
|
+
#
|
|
2298
|
+
# Returns nil if there is none
|
|
2299
|
+
def url
|
|
2300
|
+
return text_node('package/url')
|
|
2301
|
+
end
|
|
2302
|
+
|
|
2303
|
+
# The package license name
|
|
2304
|
+
#
|
|
2305
|
+
# Returns nil if there is none
|
|
2306
|
+
def license
|
|
2307
|
+
return text_node('package/license')
|
|
2308
|
+
end
|
|
2243
2309
|
end
|
|
2244
2310
|
def self.add_osdeps_overrides(*args, &block)
|
|
2245
2311
|
manifest.add_osdeps_overrides(*args, &block)
|
data/lib/autoproj/osdeps.rb
CHANGED
|
@@ -1,16 +1,41 @@
|
|
|
1
1
|
require 'tempfile'
|
|
2
2
|
module Autoproj
|
|
3
3
|
class OSDependencies
|
|
4
|
+
class << self
|
|
5
|
+
# When requested to load a file called X.Y, the osdeps code will
|
|
6
|
+
# also look for files called X-suffix.Y, where 'suffix' is an
|
|
7
|
+
# element in +osdeps_suffixes+
|
|
8
|
+
#
|
|
9
|
+
# A usage of this functionality is to make loading conditional to
|
|
10
|
+
# the available version of certain tools, namely Ruby. Autoproj for
|
|
11
|
+
# instance adds ruby18 when started on Ruby 1.8 and ruby19 when
|
|
12
|
+
# started on Ruby 1.9
|
|
13
|
+
attr_reader :suffixes
|
|
14
|
+
end
|
|
15
|
+
@suffixes = []
|
|
16
|
+
|
|
4
17
|
def self.load(file)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
if !File.file?(file)
|
|
19
|
+
raise ArgumentError, "no such file or directory #{file}"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
candidates = [file]
|
|
23
|
+
candidates.concat(suffixes.map { |s| "#{file}-#{s}" })
|
|
24
|
+
|
|
25
|
+
result = OSDependencies.new
|
|
26
|
+
candidates.each do |file|
|
|
27
|
+
next if !File.file?(file)
|
|
28
|
+
file = File.expand_path(file)
|
|
29
|
+
begin
|
|
30
|
+
data = YAML.load(File.read(file)) || Hash.new
|
|
31
|
+
verify_definitions(data)
|
|
32
|
+
rescue ArgumentError => e
|
|
33
|
+
raise ConfigError.new, "error in #{file}: #{e.message}", e.backtrace
|
|
34
|
+
end
|
|
12
35
|
|
|
13
|
-
|
|
36
|
+
result.merge(OSDependencies.new(data, file))
|
|
37
|
+
end
|
|
38
|
+
result
|
|
14
39
|
end
|
|
15
40
|
|
|
16
41
|
class << self
|
|
@@ -29,13 +54,16 @@ module Autoproj
|
|
|
29
54
|
@aliases[new_name] = old_name
|
|
30
55
|
end
|
|
31
56
|
|
|
57
|
+
def self.ruby_version_keyword
|
|
58
|
+
if RUBY_VERSION < "1.9.0" then "ruby18"
|
|
59
|
+
else "ruby19"
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
32
63
|
def self.autodetect_ruby
|
|
33
|
-
|
|
34
|
-
if RUBY_VERSION < "1.9.0" then "ruby18"
|
|
35
|
-
else "ruby19"
|
|
36
|
-
end
|
|
37
|
-
self.alias(ruby_package, "ruby")
|
|
64
|
+
self.alias(ruby_version_keyword, "ruby")
|
|
38
65
|
end
|
|
66
|
+
self.suffixes << ruby_version_keyword
|
|
39
67
|
|
|
40
68
|
AUTOPROJ_OSDEPS = File.join(File.expand_path(File.dirname(__FILE__)), 'default.osdeps')
|
|
41
69
|
def self.load_default
|
|
@@ -931,12 +959,23 @@ So, what do you want ? (all, ruby, os or none)
|
|
|
931
959
|
Autoproj.progress shell_script
|
|
932
960
|
end
|
|
933
961
|
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
962
|
+
File.open('/tmp/autoproj_osdeps_lock', 'w') do |lock_io|
|
|
963
|
+
begin
|
|
964
|
+
while !lock_io.flock(File::LOCK_EX | File::LOCK_NB)
|
|
965
|
+
Autoproj.progress " waiting for other autoproj instances to finish their osdeps installation"
|
|
966
|
+
sleep 5
|
|
967
|
+
end
|
|
968
|
+
|
|
969
|
+
Tempfile.open('osdeps_sh') do |io|
|
|
970
|
+
io.puts "#! /bin/bash"
|
|
971
|
+
io.puts GAIN_ROOT_ACCESS
|
|
972
|
+
io.write shell_script
|
|
973
|
+
io.flush
|
|
974
|
+
Autobuild::Subprocess.run 'autoproj', 'osdeps', '/bin/bash', io.path
|
|
975
|
+
end
|
|
976
|
+
ensure
|
|
977
|
+
lock_io.flock(File::LOCK_UN)
|
|
978
|
+
end
|
|
940
979
|
end
|
|
941
980
|
did_something = true
|
|
942
981
|
end
|
data/lib/autoproj/version.rb
CHANGED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
require 'autoproj'
|
|
3
|
+
|
|
4
|
+
class TC_PackageManifest < Test::Unit::TestCase
|
|
5
|
+
|
|
6
|
+
DATA_DIR = File.expand_path('data', File.dirname(__FILE__))
|
|
7
|
+
|
|
8
|
+
FakePackage = Struct.new :name, :os_packages
|
|
9
|
+
|
|
10
|
+
attr_reader :pkg
|
|
11
|
+
|
|
12
|
+
def setup
|
|
13
|
+
@pkg = FakePackage.new('test', [])
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def test_complete_manifest
|
|
17
|
+
data = File.join(DATA_DIR, 'full_manifest.xml')
|
|
18
|
+
manifest = Autoproj::PackageManifest.load(pkg, data)
|
|
19
|
+
|
|
20
|
+
assert_equal %w{tag1 tag2 tag3}, manifest.tags
|
|
21
|
+
assert_equal "full_doc", manifest.documentation
|
|
22
|
+
assert_equal "short_doc", manifest.short_documentation
|
|
23
|
+
|
|
24
|
+
deps = [['dep1', false], ['dep2', false]]
|
|
25
|
+
opt_deps = [['opt_dep1', true], ['opt_dep2', true]]
|
|
26
|
+
osdeps = [['osdep1', false], ['osdep2', false]]
|
|
27
|
+
pkg.os_packages << "osdep2"
|
|
28
|
+
|
|
29
|
+
assert_equal(osdeps, manifest.each_os_dependency.to_a)
|
|
30
|
+
assert_equal(deps + opt_deps, manifest.each_package_dependency.to_a)
|
|
31
|
+
assert_equal((deps + opt_deps + osdeps).to_set, manifest.each_dependency.to_set)
|
|
32
|
+
|
|
33
|
+
authors = [
|
|
34
|
+
["Author1", "author1@email"],
|
|
35
|
+
["Author2", "author2@email"],
|
|
36
|
+
["Author3", nil]]
|
|
37
|
+
assert_equal(authors.to_set, manifest.each_author.to_set)
|
|
38
|
+
|
|
39
|
+
assert_equal('the_url', manifest.url)
|
|
40
|
+
assert_equal('BSD', manifest.license)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def test_empty_manifest
|
|
44
|
+
data = File.join(DATA_DIR, 'empty_manifest.xml')
|
|
45
|
+
manifest = Autoproj::PackageManifest.load(pkg, data)
|
|
46
|
+
|
|
47
|
+
assert_equal [], manifest.tags
|
|
48
|
+
assert(manifest.documentation =~ /no documentation available/)
|
|
49
|
+
assert(manifest.short_documentation =~ /no documentation available/)
|
|
50
|
+
|
|
51
|
+
assert(manifest.each_os_dependency.to_a.empty?)
|
|
52
|
+
assert(manifest.each_package_dependency.to_a.empty?)
|
|
53
|
+
assert(manifest.each_dependency.to_a.empty?)
|
|
54
|
+
assert(manifest.each_author.to_a.empty?)
|
|
55
|
+
|
|
56
|
+
assert_equal(nil, manifest.url)
|
|
57
|
+
assert_equal(nil, manifest.license)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def test_failure_on_wrong_document
|
|
61
|
+
data = File.join(DATA_DIR, 'invalid_manifest.xml')
|
|
62
|
+
assert_raises(Autoproj::ConfigError) { Autoproj::PackageManifest.load(pkg, data) }
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
metadata
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autoproj
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
5
|
-
prerelease:
|
|
4
|
+
hash: 15424063
|
|
5
|
+
prerelease: 7
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 7
|
|
9
|
-
-
|
|
10
|
-
|
|
9
|
+
- 15
|
|
10
|
+
- rc
|
|
11
|
+
- 1
|
|
12
|
+
version: 1.7.15.rc1
|
|
11
13
|
platform: ruby
|
|
12
14
|
authors:
|
|
13
15
|
- Sylvain Joyeux
|
|
@@ -15,7 +17,7 @@ autorequire:
|
|
|
15
17
|
bindir: bin
|
|
16
18
|
cert_chain: []
|
|
17
19
|
|
|
18
|
-
date: 2011-
|
|
20
|
+
date: 2011-12-02 00:00:00 Z
|
|
19
21
|
dependencies:
|
|
20
22
|
- !ruby/object:Gem::Dependency
|
|
21
23
|
name: autobuild
|
|
@@ -33,42 +35,10 @@ dependencies:
|
|
|
33
35
|
version: 1.5.33
|
|
34
36
|
type: :runtime
|
|
35
37
|
version_requirements: *id001
|
|
36
|
-
- !ruby/object:Gem::Dependency
|
|
37
|
-
name: rmail
|
|
38
|
-
prerelease: false
|
|
39
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
|
40
|
-
none: false
|
|
41
|
-
requirements:
|
|
42
|
-
- - ">="
|
|
43
|
-
- !ruby/object:Gem::Version
|
|
44
|
-
hash: 23
|
|
45
|
-
segments:
|
|
46
|
-
- 1
|
|
47
|
-
- 0
|
|
48
|
-
- 0
|
|
49
|
-
version: 1.0.0
|
|
50
|
-
type: :runtime
|
|
51
|
-
version_requirements: *id002
|
|
52
38
|
- !ruby/object:Gem::Dependency
|
|
53
39
|
name: utilrb
|
|
54
40
|
prerelease: false
|
|
55
|
-
requirement: &
|
|
56
|
-
none: false
|
|
57
|
-
requirements:
|
|
58
|
-
- - ">="
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
hash: 29
|
|
61
|
-
segments:
|
|
62
|
-
- 1
|
|
63
|
-
- 3
|
|
64
|
-
- 3
|
|
65
|
-
version: 1.3.3
|
|
66
|
-
type: :runtime
|
|
67
|
-
version_requirements: *id003
|
|
68
|
-
- !ruby/object:Gem::Dependency
|
|
69
|
-
name: nokogiri
|
|
70
|
-
prerelease: false
|
|
71
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
72
42
|
none: false
|
|
73
43
|
requirements:
|
|
74
44
|
- - ">="
|
|
@@ -80,11 +50,11 @@ dependencies:
|
|
|
80
50
|
- 3
|
|
81
51
|
version: 1.3.3
|
|
82
52
|
type: :runtime
|
|
83
|
-
version_requirements: *
|
|
53
|
+
version_requirements: *id002
|
|
84
54
|
- !ruby/object:Gem::Dependency
|
|
85
55
|
name: highline
|
|
86
56
|
prerelease: false
|
|
87
|
-
requirement: &
|
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
88
58
|
none: false
|
|
89
59
|
requirements:
|
|
90
60
|
- - ">="
|
|
@@ -96,43 +66,11 @@ dependencies:
|
|
|
96
66
|
- 0
|
|
97
67
|
version: 1.5.0
|
|
98
68
|
type: :runtime
|
|
99
|
-
version_requirements: *
|
|
100
|
-
- !ruby/object:Gem::Dependency
|
|
101
|
-
name: webgen
|
|
102
|
-
prerelease: false
|
|
103
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
|
104
|
-
none: false
|
|
105
|
-
requirements:
|
|
106
|
-
- - ">="
|
|
107
|
-
- !ruby/object:Gem::Version
|
|
108
|
-
hash: 25
|
|
109
|
-
segments:
|
|
110
|
-
- 0
|
|
111
|
-
- 5
|
|
112
|
-
- 9
|
|
113
|
-
version: 0.5.9
|
|
114
|
-
type: :development
|
|
115
|
-
version_requirements: *id006
|
|
116
|
-
- !ruby/object:Gem::Dependency
|
|
117
|
-
name: rdoc
|
|
118
|
-
prerelease: false
|
|
119
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
|
120
|
-
none: false
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
hash: 31
|
|
125
|
-
segments:
|
|
126
|
-
- 2
|
|
127
|
-
- 4
|
|
128
|
-
- 0
|
|
129
|
-
version: 2.4.0
|
|
130
|
-
type: :development
|
|
131
|
-
version_requirements: *id007
|
|
69
|
+
version_requirements: *id003
|
|
132
70
|
- !ruby/object:Gem::Dependency
|
|
133
71
|
name: hoe
|
|
134
72
|
prerelease: false
|
|
135
|
-
requirement: &
|
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
136
74
|
none: false
|
|
137
75
|
requirements:
|
|
138
76
|
- - ~>
|
|
@@ -143,7 +81,7 @@ dependencies:
|
|
|
143
81
|
- 12
|
|
144
82
|
version: "2.12"
|
|
145
83
|
type: :development
|
|
146
|
-
version_requirements: *
|
|
84
|
+
version_requirements: *id004
|
|
147
85
|
description: |-
|
|
148
86
|
What is Autoproj
|
|
149
87
|
----------------
|
|
@@ -225,6 +163,7 @@ files:
|
|
|
225
163
|
- test/data/test_manifest/autoproj/manifest
|
|
226
164
|
- test/test_debian.rb
|
|
227
165
|
- test/test_manifest.rb
|
|
166
|
+
- test/test_package_manifest.rb
|
|
228
167
|
- .gemtest
|
|
229
168
|
homepage: http://rock-robotics.org/autoproj
|
|
230
169
|
licenses: []
|
|
@@ -247,12 +186,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
247
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
187
|
none: false
|
|
249
188
|
requirements:
|
|
250
|
-
- - "
|
|
189
|
+
- - ">"
|
|
251
190
|
- !ruby/object:Gem::Version
|
|
252
|
-
hash:
|
|
191
|
+
hash: 25
|
|
253
192
|
segments:
|
|
254
|
-
-
|
|
255
|
-
|
|
193
|
+
- 1
|
|
194
|
+
- 3
|
|
195
|
+
- 1
|
|
196
|
+
version: 1.3.1
|
|
256
197
|
requirements: []
|
|
257
198
|
|
|
258
199
|
rubyforge_project: autobuild
|
|
@@ -263,3 +204,4 @@ summary: Easy installation and management of software packages
|
|
|
263
204
|
test_files:
|
|
264
205
|
- test/test_manifest.rb
|
|
265
206
|
- test/test_debian.rb
|
|
207
|
+
- test/test_package_manifest.rb
|