autoproj 1.2.2 → 1.2.4
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 +15 -0
- data/Manifest.txt +1 -0
- data/Rakefile +1 -1
- data/bin/autoproj +104 -38
- data/doc/guide/src/autoproj_bootstrap +1 -1
- data/doc/guide/src/htmldoc.virtual +19 -0
- data/doc/guide/src/source_yml.page +57 -1
- data/lib/autoproj/default.osdeps +1 -1
- data/lib/autoproj/manifest.rb +102 -12
- data/lib/autoproj/options.rb +4 -0
- data/lib/autoproj/system.rb +13 -0
- data/lib/autoproj/version.rb +1 -1
- metadata +4 -3
data/History.txt
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
= Version 1.2.4
|
2
|
+
* manage LD_LIBRARY_PATH
|
3
|
+
* only include the values relevant to our packages in the generated env.sh,
|
4
|
+
instead of overcrowding them with inherited values.
|
5
|
+
|
6
|
+
= Version 1.2.3
|
7
|
+
* fix the definition of the subversion package under ubuntu/debian
|
8
|
+
* improve selection of packages on the command line. Most glitches
|
9
|
+
that appears when using that feature are gone now.
|
10
|
+
* allow to give options to the VCS during boostrap, and to switch
|
11
|
+
the source of the configuration. I.e.
|
12
|
+
autoproj switch-config git URL branch=newbranch
|
13
|
+
will exchange/update the configuration in autoproj/ with the specified one.
|
14
|
+
* bugfixes
|
15
|
+
|
1
16
|
= Version 1.2.2
|
2
17
|
* added support for Gentoo
|
3
18
|
* added support for Ubuntu 9.10 [Karmic Koala]
|
data/Manifest.txt
CHANGED
@@ -13,6 +13,7 @@ doc/guide/src/customization.page
|
|
13
13
|
doc/guide/src/default.css
|
14
14
|
doc/guide/src/default.template
|
15
15
|
doc/guide/src/htmldoc.metainfo
|
16
|
+
doc/guide/src/htmldoc.virtual
|
16
17
|
doc/guide/src/images/bodybg.png
|
17
18
|
doc/guide/src/images/contbg.png
|
18
19
|
doc/guide/src/images/footerbg.png
|
data/Rakefile
CHANGED
data/bin/autoproj
CHANGED
@@ -35,18 +35,28 @@ parser = OptionParser.new do |opts|
|
|
35
35
|
opts.banner = <<-EOBANNER
|
36
36
|
autoproj mode [options]
|
37
37
|
where 'mode' is one of:
|
38
|
-
build: import, build and install all
|
38
|
+
build: import, build and install all packages that need it. A package or package
|
39
|
+
set name can be given, in which case only this package and its dependencies
|
40
|
+
will be taken into account. Example:
|
41
|
+
|
42
|
+
autoproj build drivers/hokuyo
|
43
|
+
|
39
44
|
force-build: triggers all build commands, i.e. don't be lazy like in "build"
|
40
|
-
fast-build: builds without updating and
|
41
|
-
rebuild:
|
45
|
+
fast-build: builds without updating and without considering OS dependencies
|
46
|
+
rebuild: clean and then rebuild
|
42
47
|
doc: generate and install documentation for packages that have some
|
43
48
|
update: only import/update packages, do not build them
|
44
49
|
status: displays the state of the packages w.r.t. their source VCS
|
45
50
|
bootstrap: starts a new autoproj installation. Usage:
|
46
51
|
autoproj bootstrap [manifest_url|source_vcs source_url opt1=value1 opt2=value2 ...]
|
47
52
|
|
48
|
-
list-sets: list all available
|
49
|
-
update-sets: update
|
53
|
+
list-sets: list all available package sets
|
54
|
+
update-sets: update the package sets definitions
|
55
|
+
switch-config: change where the configuration should be taken from. Syntax:
|
56
|
+
autoproj switch-config source_vcs source_url opt1=value1 opt2=value2 ...
|
57
|
+
|
58
|
+
For example:
|
59
|
+
autoproj switch-config git git://github.com/doudou/rubim-all.git branch=all
|
50
60
|
|
51
61
|
Additional options:
|
52
62
|
EOBANNER
|
@@ -185,6 +195,68 @@ def do_status(packages)
|
|
185
195
|
end
|
186
196
|
end
|
187
197
|
|
198
|
+
def switch_config(*args)
|
199
|
+
Autoproj.load_config
|
200
|
+
if Autoproj.has_config_key?('manifest_source')
|
201
|
+
vcs = Autoproj.normalize_vcs_definition(Autoproj.user_config('manifest_source'))
|
202
|
+
end
|
203
|
+
|
204
|
+
if vcs && (vcs.type == args[0] && vcs.url == args[1])
|
205
|
+
# Don't need to do much: simply change the options and save the config
|
206
|
+
# file, the VCS handler will take care of switching the options
|
207
|
+
else
|
208
|
+
# We will have to delete the current autoproj directory. Ask the user.
|
209
|
+
opt = Autoproj::BuildOption.new("delete current config", "boolean", Hash[:default => "false", :doc => "delete the current configuration ? (required to switch)"], nil)
|
210
|
+
return if !opt.ask(nil)
|
211
|
+
FileUtils.rm_rf File.join(Autoproj.config_dir)
|
212
|
+
do_switch_config(*args)
|
213
|
+
end
|
214
|
+
|
215
|
+
# And now save the options: note that we keep the current option set even
|
216
|
+
# though we switched configuration. This is not a problem as undefined
|
217
|
+
# options will not be reused
|
218
|
+
#
|
219
|
+
# TODO: cleanup the options to only keep the relevant ones
|
220
|
+
vcs_def = Hash['type' => args.shift, 'url' => args.shift]
|
221
|
+
args.each do |opt|
|
222
|
+
opt_name, opt_val = opt.split '='
|
223
|
+
vcs_def[opt_name] = opt_val
|
224
|
+
end
|
225
|
+
# Validate the option hash, just in case
|
226
|
+
Autoproj.normalize_vcs_definition(vcs_def)
|
227
|
+
# Save the new options
|
228
|
+
Autoproj.change_option('manifest_source', vcs_def, true)
|
229
|
+
Autoproj.save_config
|
230
|
+
end
|
231
|
+
|
232
|
+
def do_switch_config(*args)
|
233
|
+
vcs_def = Hash.new
|
234
|
+
vcs_def[:type] = args.shift
|
235
|
+
vcs_def[:url] = args.shift
|
236
|
+
while !args.empty?
|
237
|
+
name, value = args.shift.split("=")
|
238
|
+
vcs_def[name] = value
|
239
|
+
end
|
240
|
+
|
241
|
+
vcs = Autoproj.normalize_vcs_definition(vcs_def)
|
242
|
+
|
243
|
+
# Install the OS dependencies required for this VCS
|
244
|
+
Autobuild::Reporting.report do
|
245
|
+
osdeps = Autoproj::OSDependencies.load_default
|
246
|
+
osdeps.install([vcs.type])
|
247
|
+
Autoproj::Manifest.import_whole_installation(vcs, File.join(Dir.pwd, "autoproj"))
|
248
|
+
end
|
249
|
+
|
250
|
+
# Now write it in the config file
|
251
|
+
File.open(File.join(Autoproj.config_dir, "config.yml"), "a") do |io|
|
252
|
+
io.puts <<-EOTEXT
|
253
|
+
manifest_source:
|
254
|
+
type: #{vcs_def.delete(:type)}
|
255
|
+
url: #{vcs_def.delete(:url)}
|
256
|
+
#{vcs_def.map { |k, v| "#{k}: #{v}" }.join("\n ")}
|
257
|
+
EOTEXT
|
258
|
+
end
|
259
|
+
end
|
188
260
|
|
189
261
|
def do_bootstrap(*args)
|
190
262
|
if File.exists?(File.join("autoproj", "manifest"))
|
@@ -192,10 +264,6 @@ def do_bootstrap(*args)
|
|
192
264
|
end
|
193
265
|
Autobuild.logdir = File.join('build', 'log')
|
194
266
|
|
195
|
-
if args.size > 2
|
196
|
-
raise ConfigError, "usage: autoproj bootstrap [manifest_url | vcs_type vcs_url]"
|
197
|
-
end
|
198
|
-
|
199
267
|
# Check if we are being called from another GEM_HOME. If it is the case,
|
200
268
|
# assume that we are bootstrapping from another installation directory and
|
201
269
|
# start by copying the .gems directory
|
@@ -226,33 +294,8 @@ def do_bootstrap(*args)
|
|
226
294
|
io.write(manifest_data)
|
227
295
|
end
|
228
296
|
|
229
|
-
elsif args.size
|
230
|
-
|
231
|
-
vcs_def[:type] = args.shift
|
232
|
-
vcs_def[:url] = args.shift
|
233
|
-
while !args.empty?
|
234
|
-
name, value = args.shift.split("=")
|
235
|
-
vcs_def[name] = value
|
236
|
-
end
|
237
|
-
|
238
|
-
vcs = Autoproj.normalize_vcs_definition(vcs_def)
|
239
|
-
|
240
|
-
# Install the OS dependencies required for this VCS
|
241
|
-
Autobuild::Reporting.report do
|
242
|
-
osdeps = Autoproj::OSDependencies.load_default
|
243
|
-
osdeps.install([vcs.type])
|
244
|
-
Autoproj::Manifest.import_whole_installation(vcs, File.join(Dir.pwd, "autoproj"))
|
245
|
-
end
|
246
|
-
|
247
|
-
# Now write it in the config file
|
248
|
-
File.open(File.join(Autoproj.config_dir, "config.yml"), "a") do |io|
|
249
|
-
io.puts <<-EOTEXT
|
250
|
-
manifest_source:
|
251
|
-
type: #{vcs_def.delete(:type)}
|
252
|
-
url: #{vcs_def.delete(:url)}
|
253
|
-
#{vcs_def.map { |k, v| "#{k}: #{v}" }.join("\n ")}
|
254
|
-
EOTEXT
|
255
|
-
end
|
297
|
+
elsif args.size > 2 # is a VCS definition for the manifest itself ...
|
298
|
+
do_switch_config(*args)
|
256
299
|
end
|
257
300
|
|
258
301
|
# Finally, generate an env.sh script
|
@@ -313,7 +356,12 @@ begin
|
|
313
356
|
when "list-sets"
|
314
357
|
only_update_sources = true
|
315
358
|
Autobuild.do_update = false
|
316
|
-
|
359
|
+
when "switch-config"
|
360
|
+
if switch_config(*args)
|
361
|
+
exit 0
|
362
|
+
else
|
363
|
+
exit 1
|
364
|
+
end
|
317
365
|
when "doc"
|
318
366
|
Autobuild.do_update = false
|
319
367
|
Autobuild.do_doc = true
|
@@ -323,7 +371,16 @@ begin
|
|
323
371
|
exit(1)
|
324
372
|
end
|
325
373
|
|
374
|
+
# Expand directories in the selected_packages set
|
326
375
|
root_dir = Autoproj.root_dir
|
376
|
+
selected_packages.map! do |name|
|
377
|
+
if File.directory?(name)
|
378
|
+
File.expand_path(name).gsub(/^#{Regexp.quote(root_dir)}/, '')
|
379
|
+
else
|
380
|
+
name
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
327
384
|
Dir.chdir(root_dir)
|
328
385
|
|
329
386
|
# Load user configuration
|
@@ -335,7 +392,7 @@ begin
|
|
335
392
|
end
|
336
393
|
end
|
337
394
|
# Set up some important autobuild parameters
|
338
|
-
Autoproj.env_inherit 'PATH', 'PKG_CONFIG_PATH', 'RUBYLIB'
|
395
|
+
Autoproj.env_inherit 'PATH', 'PKG_CONFIG_PATH', 'RUBYLIB', 'LD_LIBRARY_PATH'
|
339
396
|
Autoproj.env_set 'GEM_HOME', Autoproj.gem_home
|
340
397
|
Autoproj.env_set 'RUBYOPT', "-rubygems"
|
341
398
|
Autobuild.prefix = Autoproj.build_dir
|
@@ -490,6 +547,10 @@ begin
|
|
490
547
|
# Now starts a different stage of the whole build. Until now, we were
|
491
548
|
# working on the whole package set. Starting from now, we need to build the
|
492
549
|
# package sets based on the layout file
|
550
|
+
#
|
551
|
+
# First, we allow to user to specify packages based on disk paths, so
|
552
|
+
# resolve those
|
553
|
+
selected_packages = Autoproj.manifest.expand_package_selection(selected_packages)
|
493
554
|
|
494
555
|
# This keeps a hash of package_name => layout_name for all packages that
|
495
556
|
# have already been handled
|
@@ -613,6 +674,11 @@ begin
|
|
613
674
|
STDERR.puts color("WARN: #{name} has not been completely built, #{name}env.sh is not updated", :magenta)
|
614
675
|
end
|
615
676
|
end
|
677
|
+
|
678
|
+
libdir = File.join(prefix, "lib")
|
679
|
+
if File.directory?(libdir)
|
680
|
+
Autoproj.validate_solib_dependencies(libdir)
|
681
|
+
end
|
616
682
|
end
|
617
683
|
|
618
684
|
if !all_env_sh.empty?
|
@@ -0,0 +1,19 @@
|
|
1
|
+
\--- !omap
|
2
|
+
- /api/:
|
3
|
+
in_menu: true
|
4
|
+
|
5
|
+
- /api/index.html:
|
6
|
+
routed_title: Autoproj API
|
7
|
+
in_menu: false
|
8
|
+
sort_info: 99999
|
9
|
+
url: ../../api/index.html
|
10
|
+
|
11
|
+
- /autobuild/:
|
12
|
+
in_menu: true
|
13
|
+
|
14
|
+
- /autobuild/index.html:
|
15
|
+
routed_title: Autobuild API
|
16
|
+
in_menu: false
|
17
|
+
sort_info: 99999
|
18
|
+
url: http://doudou.github.com/autobuild/index.html
|
19
|
+
|
@@ -5,9 +5,65 @@ sort_info: 100
|
|
5
5
|
A package set is made of three things:
|
6
6
|
|
7
7
|
* the description file (source.yml)
|
8
|
-
* an optional initialization script (init.rb)
|
8
|
+
* an optional initialization script (init.rb) and override script
|
9
|
+
(overrides.rb)
|
9
10
|
* autobuild scripts (\*.autobuild)
|
10
11
|
|
12
|
+
Starting a new package set
|
13
|
+
--------------------------
|
14
|
+
|
15
|
+
Create a subdirectory in autoproj/ and add a source.yml file that looks like:
|
16
|
+
|
17
|
+
{coderay:: yaml}
|
18
|
+
name my_package_set_name
|
19
|
+
{coderay}
|
20
|
+
|
21
|
+
Et voila ! You have a new empty package set
|
22
|
+
|
23
|
+
Adding a package
|
24
|
+
----------------
|
25
|
+
|
26
|
+
Adding a package to a package set involves changing two files:
|
27
|
+
|
28
|
+
* the package set's autobuild file that declares what type of package it is and
|
29
|
+
* the package set's source.yml file that declares where to get it (version
|
30
|
+
control information)
|
31
|
+
|
32
|
+
For the first step, you need to add one of the following lines:
|
33
|
+
|
34
|
+
{coderay:: ruby}
|
35
|
+
cmake_package "my/package" # for CMake package
|
36
|
+
autotools_package "my/package" # for autoconf/automake packages
|
37
|
+
orogen_package "my/package" # for orogen packages
|
38
|
+
{coderay}
|
39
|
+
|
40
|
+
The package name will be used to refer to this particular package later on --
|
41
|
+
especially for version control definition. If subdirectories are used, like "my"
|
42
|
+
in the above example, the package source will be checked out and built in the
|
43
|
+
corresponding subdirectory.
|
44
|
+
|
45
|
+
Now that the package is declared, we need to add version control information to
|
46
|
+
the source.yml file. This needs to be done in the version\_control section of
|
47
|
+
the file, as for instance:
|
48
|
+
|
49
|
+
{coderay:: yaml}
|
50
|
+
version_control:
|
51
|
+
- my/package:
|
52
|
+
type: git
|
53
|
+
url: git://github.com/blabla/my-package.git
|
54
|
+
{coderay}
|
55
|
+
|
56
|
+
The corresponding subversion definition would be:
|
57
|
+
|
58
|
+
{coderay:: yaml}
|
59
|
+
version_control:
|
60
|
+
- my/package:
|
61
|
+
type: svn
|
62
|
+
url: svn+ssh://svnhosting.com/blabla/trunk/my/package
|
63
|
+
{coderay}
|
64
|
+
|
65
|
+
The remaining of this page is a more in-depth description of this process.
|
66
|
+
|
11
67
|
Autobuild scripts
|
12
68
|
-----------------
|
13
69
|
The autobuild scripts lists all the packages defined by this set. It is a
|
data/lib/autoproj/default.osdeps
CHANGED
data/lib/autoproj/manifest.rb
CHANGED
@@ -53,7 +53,7 @@ module Autoproj
|
|
53
53
|
|
54
54
|
# Set a new environment variable
|
55
55
|
def self.env_set(name, *value)
|
56
|
-
Autobuild.
|
56
|
+
Autobuild.env_clear(name)
|
57
57
|
env_add(name, *value)
|
58
58
|
end
|
59
59
|
def self.env_add(name, *value)
|
@@ -61,7 +61,7 @@ module Autoproj
|
|
61
61
|
Autobuild.env_add(name, *value)
|
62
62
|
end
|
63
63
|
def self.env_set_path(name, *value)
|
64
|
-
Autobuild.
|
64
|
+
Autobuild.env_clear(name)
|
65
65
|
env_add_path(name, *value)
|
66
66
|
end
|
67
67
|
def self.env_add_path(name, *value)
|
@@ -89,7 +89,7 @@ module Autoproj
|
|
89
89
|
return if type == "none"
|
90
90
|
|
91
91
|
url = Autoproj.single_expansion(self.url, 'HOME' => ENV['HOME'])
|
92
|
-
if url && url !~ /^(\w+:\/)?\/|^\w
|
92
|
+
if url && url !~ /^(\w+:\/)?\/|^\w+\@|^(\w+\@)?[\w\.-]+:/
|
93
93
|
url = File.expand_path(url, Autoproj.root_dir)
|
94
94
|
end
|
95
95
|
Autobuild.send(type, url, options)
|
@@ -164,6 +164,12 @@ module Autoproj
|
|
164
164
|
def present?; File.directory?(local_dir) end
|
165
165
|
# True if this source is local, i.e. is not under a version control
|
166
166
|
def local?; vcs.local? end
|
167
|
+
# True if this source defines nothing
|
168
|
+
def empty?
|
169
|
+
!source_definition['version_control'] &&
|
170
|
+
!each_package.find { true }
|
171
|
+
end
|
172
|
+
|
167
173
|
# The directory in which data for this source will be checked out
|
168
174
|
def local_dir
|
169
175
|
if local?
|
@@ -307,6 +313,7 @@ module Autoproj
|
|
307
313
|
|
308
314
|
if all_vcs
|
309
315
|
all_vcs.each do |spec|
|
316
|
+
spec = spec.dup
|
310
317
|
if spec.values.size != 1
|
311
318
|
# Maybe the user wrote the spec like
|
312
319
|
# - package_name:
|
@@ -490,7 +497,7 @@ module Autoproj
|
|
490
497
|
return enum_for(:each_source_file)
|
491
498
|
end
|
492
499
|
|
493
|
-
each_source do |source|
|
500
|
+
each_source(false) do |source|
|
494
501
|
Dir.glob(File.join(source.local_dir, "*.osdeps")).each do |file|
|
495
502
|
yield(source, file)
|
496
503
|
end
|
@@ -525,8 +532,12 @@ module Autoproj
|
|
525
532
|
end
|
526
533
|
|
527
534
|
source = Source.new(vcs_def)
|
528
|
-
if
|
529
|
-
source.
|
535
|
+
if load_description
|
536
|
+
if source.present?
|
537
|
+
source.load_description_file
|
538
|
+
else
|
539
|
+
raise InternalError, "cannot load description file as it has not been checked out yet"
|
540
|
+
end
|
530
541
|
else
|
531
542
|
# Try to load just the name from the source.yml file
|
532
543
|
source.load_name
|
@@ -541,11 +552,15 @@ module Autoproj
|
|
541
552
|
#
|
542
553
|
# Lists all package sets defined in this manifest, by yielding a Source
|
543
554
|
# object that describes it.
|
544
|
-
def each_source(load_description = true)
|
555
|
+
def each_source(load_description = true, &block)
|
545
556
|
if !block_given?
|
546
557
|
return enum_for(:each_source, load_description)
|
547
558
|
end
|
548
559
|
|
560
|
+
if @sources
|
561
|
+
return @sources.each(&block)
|
562
|
+
end
|
563
|
+
|
549
564
|
return if !data['package_sets']
|
550
565
|
|
551
566
|
# Load the local source first ...
|
@@ -555,10 +570,24 @@ module Autoproj
|
|
555
570
|
else
|
556
571
|
local.load_name
|
557
572
|
end
|
558
|
-
|
573
|
+
if load_description
|
574
|
+
if !local.empty?
|
575
|
+
yield(local)
|
576
|
+
if load_description
|
577
|
+
@sources = [local]
|
578
|
+
end
|
579
|
+
end
|
580
|
+
@sources ||= []
|
581
|
+
else
|
582
|
+
yield(local)
|
583
|
+
end
|
559
584
|
|
560
585
|
data['package_sets'].each do |spec|
|
561
|
-
|
586
|
+
source = source_from_spec(spec, load_description)
|
587
|
+
if load_description
|
588
|
+
@sources << source
|
589
|
+
end
|
590
|
+
yield(source)
|
562
591
|
end
|
563
592
|
end
|
564
593
|
|
@@ -687,6 +716,7 @@ module Autoproj
|
|
687
716
|
result
|
688
717
|
end
|
689
718
|
|
719
|
+
# Enumerates the sublayouts defined in +layout_def+.
|
690
720
|
def each_sublayout(layout_def)
|
691
721
|
layout_def.each do |value|
|
692
722
|
if value.kind_of?(Hash)
|
@@ -700,18 +730,18 @@ module Autoproj
|
|
700
730
|
# and sublayout in order
|
701
731
|
def each_package_set(selection, layout_name = '/', layout_def = data['layout'], &block)
|
702
732
|
if !layout_def
|
703
|
-
yield(
|
733
|
+
yield(layout_name, default_packages, default_packages)
|
704
734
|
return nil
|
705
735
|
end
|
706
736
|
|
707
|
-
selection = selection.to_set
|
737
|
+
selection = selection.to_set if selection
|
708
738
|
|
709
739
|
# First of all, do the packages at this level
|
710
740
|
packages = layout_packages(layout_def, false)
|
711
741
|
# Remove excluded packages
|
712
742
|
packages.delete_if { |pkg_name| excluded?(pkg_name) }
|
713
743
|
|
714
|
-
if selection
|
744
|
+
if selection
|
715
745
|
selected_packages = packages.find_all { |pkg_name| selection.include?(pkg_name) }
|
716
746
|
else
|
717
747
|
selected_packages = packages.dup
|
@@ -802,6 +832,66 @@ module Autoproj
|
|
802
832
|
|
803
833
|
osdeps.install(required_os_packages)
|
804
834
|
end
|
835
|
+
|
836
|
+
# Package selection can be done in three ways:
|
837
|
+
# * as a subdirectory in the layout
|
838
|
+
# * as a on-disk directory
|
839
|
+
# * as a package name
|
840
|
+
#
|
841
|
+
# This method converts the first two directories into the third one
|
842
|
+
def expand_package_selection(selected_packages)
|
843
|
+
base_dir = Autoproj.root_dir
|
844
|
+
|
845
|
+
expanded_packages = []
|
846
|
+
|
847
|
+
# Get all the package names
|
848
|
+
package_names = Autobuild::Package.each(true).
|
849
|
+
map do |name, pkg|
|
850
|
+
pkg.name
|
851
|
+
end
|
852
|
+
|
853
|
+
selected_packages = selected_packages.map do |sel|
|
854
|
+
if sel[0] == ?/ # anchored selection
|
855
|
+
/^#{sel}/
|
856
|
+
else
|
857
|
+
Regexp.new(sel)
|
858
|
+
end
|
859
|
+
end
|
860
|
+
|
861
|
+
# First, remove packages that are directly referenced by name or by
|
862
|
+
# package set names
|
863
|
+
selected_packages.delete_if do |sel|
|
864
|
+
packages = package_names.find_all { |pkg_name| pkg_name =~ sel }
|
865
|
+
expanded_packages.concat(packages)
|
866
|
+
|
867
|
+
sources = each_source.find_all { |source| source.name =~ sel }
|
868
|
+
sources.each do |source|
|
869
|
+
expanded_packages.concat(resolve_package_set(source.name))
|
870
|
+
end
|
871
|
+
|
872
|
+
!packages.empty? && !sources.empty?
|
873
|
+
end
|
874
|
+
|
875
|
+
if selected_packages.empty?
|
876
|
+
return expanded_packages
|
877
|
+
end
|
878
|
+
|
879
|
+
# Now, expand sublayout and directory names
|
880
|
+
each_package_set(nil) do |layout_name, packages, _|
|
881
|
+
selected_packages.delete_if do |sel|
|
882
|
+
if layout_name[0..-1] =~ Regexp.new("#{sel}\/?$")
|
883
|
+
expanded_packages.concat(packages.to_a)
|
884
|
+
else
|
885
|
+
packages = packages.find_all do |pkg_name|
|
886
|
+
(layout_name + pkg_name) =~ sel
|
887
|
+
end
|
888
|
+
expanded_packages.concat(packages)
|
889
|
+
!packages.empty?
|
890
|
+
end
|
891
|
+
end
|
892
|
+
end
|
893
|
+
expanded_packages.to_set
|
894
|
+
end
|
805
895
|
end
|
806
896
|
|
807
897
|
# The singleton manifest object on which the current run works
|
data/lib/autoproj/options.rb
CHANGED
@@ -76,6 +76,10 @@ module Autoproj
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
+
def self.change_option(key, value, user_validated = false)
|
80
|
+
@user_config[key] = [value, user_validated]
|
81
|
+
end
|
82
|
+
|
79
83
|
def self.user_config(key)
|
80
84
|
value, seen = @user_config[key]
|
81
85
|
# All non-user options are always considered as "seen"
|
data/lib/autoproj/system.rb
CHANGED
@@ -50,6 +50,7 @@ module Autoproj
|
|
50
50
|
Autoproj.env_set_path 'PATH', "#{Autoproj.gem_home}/bin", "/usr/local/bin", "/usr/bin", "/bin"
|
51
51
|
Autoproj.env_set 'PKG_CONFIG_PATH'
|
52
52
|
Autoproj.env_set 'RUBYLIB'
|
53
|
+
Autoproj.env_set 'LD_LIBRARY_PATH'
|
53
54
|
end
|
54
55
|
|
55
56
|
def self.export_env_sh(subdir)
|
@@ -81,5 +82,17 @@ module Autoproj
|
|
81
82
|
self.load(source, *path)
|
82
83
|
end
|
83
84
|
end
|
85
|
+
|
86
|
+
def self.validate_solib_dependencies(dir, exclude_paths = [])
|
87
|
+
Find.find(File.expand_path(dir)) do |name|
|
88
|
+
next unless name =~ /\.so$/
|
89
|
+
next if exclude_paths.find { |p| name =~ p }
|
90
|
+
|
91
|
+
output = `ldd -r #{name} 2>&1`
|
92
|
+
if output =~ /undefined symbol/
|
93
|
+
STDERR.puts Autoproj.console.color("WARN: #{name} has undefined symbols", :magenta)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
84
97
|
end
|
85
98
|
|
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.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-26 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.4.
|
23
|
+
version: 1.4.3
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rmail
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- doc/guide/src/default.css
|
144
144
|
- doc/guide/src/default.template
|
145
145
|
- doc/guide/src/htmldoc.metainfo
|
146
|
+
- doc/guide/src/htmldoc.virtual
|
146
147
|
- doc/guide/src/images/bodybg.png
|
147
148
|
- doc/guide/src/images/contbg.png
|
148
149
|
- doc/guide/src/images/footerbg.png
|