autoproj 1.7.8 → 1.7.9
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 +16 -0
- data/README.txt +18 -18
- data/bin/amake +51 -3
- data/bin/aup +42 -3
- data/bin/autoproj +6 -0
- data/bin/autoproj_bootstrap +47 -15
- data/lib/autoproj/autobuild.rb +3 -1
- data/lib/autoproj/cmdline.rb +60 -7
- data/lib/autoproj/manifest.rb +8 -0
- data/lib/autoproj/osdeps.rb +47 -15
- data/lib/autoproj/version.rb +1 -1
- metadata +17 -17
data/History.txt
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
= Version 1.7.9
|
|
2
|
+
* improve ruby 1.9 compatibility
|
|
3
|
+
* fix ignoring osdeps dependencies completely, i.e.
|
|
4
|
+
|
|
5
|
+
ruby: ignore
|
|
6
|
+
|
|
7
|
+
is now working fine (before, one had to provide at least an OS name)
|
|
8
|
+
|
|
9
|
+
* on dpkg-based systems (debian, ubuntu), fix detection of installed virtual packages
|
|
10
|
+
* fix passing autoproj options from aup and amake to autoproj itself (it was
|
|
11
|
+
broken). One can now *really* do
|
|
12
|
+
|
|
13
|
+
amake --no-deps
|
|
14
|
+
|
|
15
|
+
as advertised by the 1.7.8 release notes.
|
|
16
|
+
|
|
1
17
|
= Version 1.7.8
|
|
2
18
|
* fix bootstrap and switch-config with VCS options (i.e. setting a branch on
|
|
3
19
|
the git importer)
|
data/README.txt
CHANGED
|
@@ -7,21 +7,21 @@ version control repository (think "distributed version control"). It also
|
|
|
7
7
|
provides an easy integration of the local operating system (Debian, Ubuntu,
|
|
8
8
|
Fedora, maybe MacOSX at some point).
|
|
9
9
|
|
|
10
|
-
This tool has been
|
|
11
|
-
(http://
|
|
10
|
+
This tool has been over the years. It is now maintained in the frame of the Rock
|
|
11
|
+
robotics project (http://rock-robotics.org), to install robotics-related
|
|
12
12
|
software -- that is often bleeding edge. Unlike [the ROS build
|
|
13
13
|
system](http://ros.org), it is not bound to one build system, one VCS and one
|
|
14
14
|
integration framework. The philosophy behind autoproj
|
|
15
15
|
is:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
* supports both CMake and autotools, and can be adapted to other tools
|
|
17
|
+
* supports different VCS: cvs, svn, git, plain tarballs.
|
|
18
|
+
* software packages are plain packages, meaning that they can be built and
|
|
19
|
+
installed /outside/ an autoproj tree, and are not tied *at all* to the
|
|
20
|
+
autoproj build system.
|
|
21
|
+
* leverage the actual OS package management system. Right now, only Debian-like
|
|
22
|
+
systems (like Ubuntu) are supported, simply because it is the only one I have
|
|
23
|
+
access to.
|
|
24
|
+
* handle code generation properly
|
|
25
25
|
|
|
26
26
|
It tries as much as possible to follow the lead of Willow Garage on the package
|
|
27
27
|
specification. More specifically, the package manifest files are common between
|
|
@@ -38,12 +38,12 @@ complete configuration per-project).
|
|
|
38
38
|
|
|
39
39
|
Each package definition includes:
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
* how to get the package's source code
|
|
42
|
+
* how to build the package
|
|
43
|
+
* on what the package depends. This can be either another package built by
|
|
44
|
+
autoproj, or an operating system package.
|
|
45
45
|
|
|
46
|
-
See
|
|
46
|
+
See this page[http://rock-robotics.org/writing_manifest.html] for more information.
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
Software packages in Autoproj
|
|
@@ -59,6 +59,6 @@ As a guideline, we recommend that inter-package dependencies are managed by
|
|
|
59
59
|
using pkg-config.
|
|
60
60
|
|
|
61
61
|
To describe the package, and more importantly to setup cross-package
|
|
62
|
-
dependencies,
|
|
63
|
-
added
|
|
62
|
+
dependencies, an optional manifest file can be
|
|
63
|
+
added[http://rock-robotics.org/package_sets/manifest-xml.html].
|
|
64
64
|
|
data/bin/amake
CHANGED
|
@@ -1,8 +1,56 @@
|
|
|
1
1
|
#! /usr/bin/env ruby
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
require 'optparse'
|
|
4
|
+
|
|
5
|
+
build_all = false
|
|
6
|
+
force = false
|
|
7
|
+
|
|
8
|
+
parser = OptionParser.new do |opt|
|
|
9
|
+
opt.banner = "amake [options] [dir_or_package]
|
|
10
|
+
Runs autoproj build for the given directory or package name.
|
|
11
|
+
Selects the current directory if none is given
|
|
12
|
+
|
|
13
|
+
Accepts all options from autoproj build plus the following options:
|
|
14
|
+
|
|
15
|
+
"
|
|
16
|
+
opt.on('--all', 'runs autoproj build without arguments (does not add the current directory)') do
|
|
17
|
+
build_all = true
|
|
18
|
+
end
|
|
19
|
+
opt.on('--force', 'runs autoproj force-build instead of autoproj build') do
|
|
20
|
+
force = true
|
|
21
|
+
end
|
|
22
|
+
opt.on('--help', 'shows this help message') do
|
|
23
|
+
puts parser
|
|
24
|
+
exit(0)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Accept options that are invalid in +parser+, to pass them on to autoproj
|
|
29
|
+
# itself
|
|
30
|
+
options = ARGV.dup
|
|
31
|
+
remaining = []
|
|
32
|
+
while !options.empty?
|
|
33
|
+
begin
|
|
34
|
+
head = options.shift
|
|
35
|
+
remaining.concat(parser.parse([head]))
|
|
36
|
+
rescue OptionParser::InvalidOption
|
|
37
|
+
remaining << head
|
|
38
|
+
retry
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# If --all is not given *and* there is no non-option argument (i.e. no directory
|
|
43
|
+
# / package name), add the current directory to the command line
|
|
44
|
+
if remaining.grep(/^-/).size == remaining.size && !build_all
|
|
45
|
+
remaining.push '.'
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
if force
|
|
49
|
+
remaining.unshift "force-build"
|
|
50
|
+
else
|
|
51
|
+
remaining.unshift "build"
|
|
5
52
|
end
|
|
6
|
-
ARGV.
|
|
53
|
+
ARGV.clear
|
|
54
|
+
ARGV.concat(remaining)
|
|
7
55
|
load File.expand_path('autoproj', File.dirname(__FILE__))
|
|
8
56
|
|
data/bin/aup
CHANGED
|
@@ -1,8 +1,47 @@
|
|
|
1
1
|
#! /usr/bin/env ruby
|
|
2
|
+
require 'optparse'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
build_all = false
|
|
5
|
+
parser = OptionParser.new do |opt|
|
|
6
|
+
opt.banner = "aup [options] [dir_or_package]
|
|
7
|
+
Runs autoproj update for the given directory or package name.
|
|
8
|
+
Selects the current directory if none is given. Override by
|
|
9
|
+
passing the --all option.
|
|
10
|
+
|
|
11
|
+
Accepts all options from autoproj update plus the following options:
|
|
12
|
+
|
|
13
|
+
"
|
|
14
|
+
opt.on('--all', 'runs autoproj build without arguments (does not add the current directory)') do
|
|
15
|
+
build_all = true
|
|
16
|
+
end
|
|
17
|
+
opt.on('--help', 'shows this help message') do
|
|
18
|
+
puts parser
|
|
19
|
+
exit(0)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Accept options that are invalid in +parser+, to pass them on to autoproj
|
|
24
|
+
# itself
|
|
25
|
+
options = ARGV.dup
|
|
26
|
+
remaining = []
|
|
27
|
+
while !options.empty?
|
|
28
|
+
begin
|
|
29
|
+
head = options.shift
|
|
30
|
+
remaining.concat(parser.parse([head]))
|
|
31
|
+
rescue OptionParser::InvalidOption
|
|
32
|
+
remaining << head
|
|
33
|
+
retry
|
|
34
|
+
end
|
|
5
35
|
end
|
|
6
|
-
|
|
36
|
+
|
|
37
|
+
# If --all is not given *and* there is no non-option argument (i.e. no directory
|
|
38
|
+
# / package name), add the current directory to the command line
|
|
39
|
+
if remaining.grep(/^-/).size == remaining.size && !build_all
|
|
40
|
+
remaining.push '.'
|
|
41
|
+
end
|
|
42
|
+
remaining.unshift 'update'
|
|
43
|
+
|
|
44
|
+
ARGV.clear
|
|
45
|
+
ARGV.concat(remaining)
|
|
7
46
|
load File.expand_path('autoproj', File.dirname(__FILE__))
|
|
8
47
|
|
data/bin/autoproj
CHANGED
|
@@ -166,9 +166,15 @@ EOTEXT
|
|
|
166
166
|
elsif Autoproj::CmdLine.revshow_osdeps?
|
|
167
167
|
all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages)
|
|
168
168
|
Autoproj::CmdLine.revshow_osdeps(all_enabled_packages)
|
|
169
|
+
exit(0)
|
|
169
170
|
elsif Autoproj::CmdLine.show_osdeps?
|
|
170
171
|
all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages)
|
|
171
172
|
Autoproj::CmdLine.show_osdeps(all_enabled_packages)
|
|
173
|
+
exit(0)
|
|
174
|
+
elsif Autoproj::CmdLine.list_unused?
|
|
175
|
+
all_enabled_packages = Autoproj::CmdLine.import_packages(selected_packages)
|
|
176
|
+
Autoproj::CmdLine.list_unused(all_enabled_packages)
|
|
177
|
+
exit(0)
|
|
172
178
|
end
|
|
173
179
|
|
|
174
180
|
STDERR.puts
|
data/bin/autoproj_bootstrap
CHANGED
|
@@ -255,7 +255,7 @@ module Autoproj
|
|
|
255
255
|
#
|
|
256
256
|
# Examples: ['debian', ['sid', 'unstable']] or ['ubuntu', ['lucid lynx', '10.04']]
|
|
257
257
|
def self.operating_system
|
|
258
|
-
if
|
|
258
|
+
if !@operating_system.nil?
|
|
259
259
|
return @operating_system
|
|
260
260
|
elsif Autoproj.has_config_key?('operating_system')
|
|
261
261
|
os = Autoproj.user_config('operating_system')
|
|
@@ -268,19 +268,28 @@ module Autoproj
|
|
|
268
268
|
end
|
|
269
269
|
end
|
|
270
270
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
if user_os = ENV['AUTOPROJ_OS']
|
|
272
|
+
if user_os.empty?
|
|
273
|
+
@operating_system = false
|
|
274
|
+
else
|
|
275
|
+
names, versions = user_os.split(':')
|
|
276
|
+
@operating_system = [names.split(','), versions.split(',')]
|
|
277
|
+
end
|
|
278
|
+
else
|
|
279
|
+
Autoproj.progress " autodetecting the operating system"
|
|
280
|
+
name, versions = os_from_lsb
|
|
281
|
+
if name
|
|
282
|
+
if name != "debian"
|
|
283
|
+
if File.exists?("/etc/debian_version")
|
|
284
|
+
@operating_system = [[name, "debian"], versions]
|
|
285
|
+
else
|
|
286
|
+
@operating_system = [[name], versions]
|
|
287
|
+
end
|
|
279
288
|
end
|
|
280
289
|
end
|
|
281
290
|
end
|
|
282
291
|
|
|
283
|
-
if
|
|
292
|
+
if @operating_system.nil?
|
|
284
293
|
# Need to do some heuristics unfortunately
|
|
285
294
|
@operating_system =
|
|
286
295
|
if File.exists?('/etc/debian_version')
|
|
@@ -334,12 +343,27 @@ module Autoproj
|
|
|
334
343
|
if !@dpkg_installed_packages
|
|
335
344
|
@dpkg_installed_packages = Set.new
|
|
336
345
|
dpkg_status = File.readlines('/var/lib/dpkg/status')
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
346
|
+
|
|
347
|
+
current_packages = []
|
|
348
|
+
is_installed = false
|
|
349
|
+
dpkg_status.each do |line|
|
|
350
|
+
line = line.chomp
|
|
351
|
+
if line == ""
|
|
352
|
+
if is_installed
|
|
353
|
+
current_packages.each do |pkg|
|
|
354
|
+
@dpkg_installed_packages << pkg
|
|
355
|
+
end
|
|
356
|
+
current_packages.clear
|
|
357
|
+
is_installed = false
|
|
341
358
|
end
|
|
359
|
+
elsif line =~ /Package: (.*)$/
|
|
360
|
+
current_packages << $1
|
|
361
|
+
elsif line =~ /Provides: (.*)$/
|
|
362
|
+
current_packages << $1
|
|
363
|
+
elsif line == "Status: install ok installed"
|
|
364
|
+
is_installed = true
|
|
342
365
|
end
|
|
366
|
+
end
|
|
343
367
|
end
|
|
344
368
|
|
|
345
369
|
if package_name =~ /^(\w[a-z0-9+-.]+)/
|
|
@@ -410,6 +434,10 @@ fi
|
|
|
410
434
|
return NO_PACKAGE
|
|
411
435
|
end
|
|
412
436
|
|
|
437
|
+
if dep_def == 'ignore'
|
|
438
|
+
return IGNORE
|
|
439
|
+
end
|
|
440
|
+
|
|
413
441
|
if !os_names
|
|
414
442
|
return UNKNOWN_OS
|
|
415
443
|
end
|
|
@@ -699,6 +727,8 @@ Finally, OS dependencies can be installed by calling "autoproj osdeps"
|
|
|
699
727
|
with the corresponding option (--all, --ruby, --os or --none). Calling
|
|
700
728
|
"autoproj osdeps" without arguments will also give you information as
|
|
701
729
|
to what you should install to compile the software successfully.
|
|
730
|
+
|
|
731
|
+
So, what do you want ? (ruby or none)
|
|
702
732
|
EOT
|
|
703
733
|
message = [ "Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (ruby, none) ?", long_doc.strip ]
|
|
704
734
|
|
|
@@ -736,6 +766,8 @@ an autoproj operation with the --reconfigure option (e.g. autoproj update
|
|
|
736
766
|
|
|
737
767
|
Finally, OS dependencies can be installed by calling "autoproj osdeps"
|
|
738
768
|
with the corresponding option (--all, --ruby, --os or --none).
|
|
769
|
+
|
|
770
|
+
So, what do you want ? (all, ruby, os or none)
|
|
739
771
|
EOT
|
|
740
772
|
message = [ "Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (all, ruby, os, none) ?", long_doc.strip ]
|
|
741
773
|
|
|
@@ -825,7 +857,7 @@ with the corresponding option (--all, --ruby, --os or --none).
|
|
|
825
857
|
def osdeps_interaction_unknown_os(osdeps)
|
|
826
858
|
puts <<-EOMSG
|
|
827
859
|
#{Autoproj.color("The build process requires some other software packages to be installed on our operating system", :bold)}
|
|
828
|
-
#{Autoproj.color("If they are already installed, simply ignore this message", :red)}
|
|
860
|
+
#{Autoproj.color("If they are already installed, simply ignore this message", :red)}
|
|
829
861
|
|
|
830
862
|
#{osdeps.join("\n ")}
|
|
831
863
|
|
data/lib/autoproj/autobuild.rb
CHANGED
|
@@ -116,6 +116,8 @@ module Autobuild
|
|
|
116
116
|
if osdeps_availability == Autoproj::OSDependencies::AVAILABLE
|
|
117
117
|
@os_packages << name
|
|
118
118
|
return
|
|
119
|
+
elsif osdeps_availability == Autoproj::OSDependencies::IGNORE
|
|
120
|
+
return
|
|
119
121
|
end
|
|
120
122
|
|
|
121
123
|
if osdeps_availability == Autoproj::OSDependencies::UNKNOWN_OS
|
|
@@ -135,7 +137,7 @@ module Autobuild
|
|
|
135
137
|
# Call osdeps to get a proper error message
|
|
136
138
|
osdeps, gems = Autoproj.osdeps.partition_packages([name].to_set, name => [self.name])
|
|
137
139
|
Autoproj.osdeps.resolve_os_dependencies(osdeps)
|
|
138
|
-
rescue ConfigError => e
|
|
140
|
+
rescue Autoproj::ConfigError => e
|
|
139
141
|
if osdeps_availability != Autoproj::OSDependencies::NO_PACKAGE && !Autoproj.osdeps.installs_os_packages?
|
|
140
142
|
Autoproj.warn "in #{File.join(srcdir, 'manifest.xml')}: #{e.message}"
|
|
141
143
|
Autoproj.warn "this osdeps dependency is simply ignored as you asked autoproj to not install osdeps packages"
|
data/lib/autoproj/cmdline.rb
CHANGED
|
@@ -707,6 +707,7 @@ module Autoproj
|
|
|
707
707
|
def self.doc?; @mode == "doc" end
|
|
708
708
|
def self.snapshot?; @mode == "snapshot" end
|
|
709
709
|
def self.reconfigure?; @mode == "reconfigure" end
|
|
710
|
+
def self.list_unused?; @mode == "list-unused" end
|
|
710
711
|
|
|
711
712
|
def self.show_statistics?; !!@show_statistics end
|
|
712
713
|
def self.ignore_dependencies?; @ignore_dependencies end
|
|
@@ -794,13 +795,18 @@ where 'mode' is one of:
|
|
|
794
795
|
autoproj bootstrap [manifest_url|source_vcs source_url opt1=value1 opt2=value2 ...]
|
|
795
796
|
|
|
796
797
|
For example:
|
|
797
|
-
autoproj bootstrap git git://
|
|
798
|
+
autoproj bootstrap git git://gitorious.org/rock/buildconfig.git
|
|
798
799
|
|
|
799
800
|
switch-config: change where the configuration should be taken from. Syntax:
|
|
800
801
|
autoproj switch-config source_vcs source_url opt1=value1 opt2=value2 ...
|
|
801
802
|
|
|
802
803
|
For example:
|
|
803
|
-
autoproj switch-config git git://
|
|
804
|
+
autoproj switch-config git git://gitorious.org/rock/buildconfig.git
|
|
805
|
+
|
|
806
|
+
In case only the options need to be changed, the source_vcs and source_url fields can be omitted:
|
|
807
|
+
|
|
808
|
+
For example:
|
|
809
|
+
autoproj switch-config branch=next
|
|
804
810
|
|
|
805
811
|
-- Additional options:
|
|
806
812
|
EOBANNER
|
|
@@ -927,6 +933,7 @@ where 'mode' is one of:
|
|
|
927
933
|
@mode = args.shift
|
|
928
934
|
unknown_mode = catch(:unknown) do
|
|
929
935
|
handle_mode(@mode, args)
|
|
936
|
+
false
|
|
930
937
|
end
|
|
931
938
|
if unknown_mode
|
|
932
939
|
STDERR.puts "unknown mode #{@mode}"
|
|
@@ -1059,6 +1066,10 @@ where 'mode' is one of:
|
|
|
1059
1066
|
@update_os_dependencies = false
|
|
1060
1067
|
Autobuild.do_doc = true
|
|
1061
1068
|
Autobuild.only_doc = true
|
|
1069
|
+
when "list-unused"
|
|
1070
|
+
Autobuild.do_update = false
|
|
1071
|
+
Autobuild.do_build = false
|
|
1072
|
+
@update_os_dependencies = false
|
|
1062
1073
|
else
|
|
1063
1074
|
throw :unknown, true
|
|
1064
1075
|
end
|
|
@@ -1483,11 +1494,11 @@ export PATH=$GEM_HOME/bin:$PATH
|
|
|
1483
1494
|
end
|
|
1484
1495
|
|
|
1485
1496
|
overrides_path = File.join(target_dir, 'overrides.yml')
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1497
|
+
if File.exists?(overrides_path)
|
|
1498
|
+
overrides = YAML.load(File.read(overrides_path))
|
|
1499
|
+
end
|
|
1500
|
+
# In Ruby 1.9, an empty file results in YAML.load returning false
|
|
1501
|
+
overrides ||= Hash.new
|
|
1491
1502
|
|
|
1492
1503
|
if overrides['overrides']
|
|
1493
1504
|
overrides['overrides'].concat(version_control)
|
|
@@ -1648,6 +1659,48 @@ export PATH=$GEM_HOME/bin:$PATH
|
|
|
1648
1659
|
raise
|
|
1649
1660
|
end
|
|
1650
1661
|
end
|
|
1662
|
+
|
|
1663
|
+
def self.list_unused(all_enabled_packages)
|
|
1664
|
+
all_enabled_packages = all_enabled_packages.map do |pkg_name|
|
|
1665
|
+
Autobuild::Package[pkg_name]
|
|
1666
|
+
end
|
|
1667
|
+
leaf_dirs = (all_enabled_packages.map(&:srcdir) +
|
|
1668
|
+
all_enabled_packages.map(&:prefix)).to_set
|
|
1669
|
+
leaf_dirs << Autoproj.config_dir
|
|
1670
|
+
leaf_dirs << Autoproj.gem_home
|
|
1671
|
+
leaf_dirs << Autoproj.remotes_dir
|
|
1672
|
+
|
|
1673
|
+
root = Autoproj.root_dir
|
|
1674
|
+
all_dirs = leaf_dirs.dup
|
|
1675
|
+
leaf_dirs.each do |dir|
|
|
1676
|
+
dir = File.dirname(dir)
|
|
1677
|
+
while dir != root
|
|
1678
|
+
break if all_dirs.include?(dir)
|
|
1679
|
+
all_dirs << dir
|
|
1680
|
+
dir = File.dirname(dir)
|
|
1681
|
+
end
|
|
1682
|
+
end
|
|
1683
|
+
all_dirs << Autoproj.root_dir
|
|
1684
|
+
|
|
1685
|
+
unused = Set.new
|
|
1686
|
+
Find.find(Autoproj.root_dir) do |path|
|
|
1687
|
+
next if !File.directory?(path)
|
|
1688
|
+
if !all_dirs.include?(path)
|
|
1689
|
+
unused << path
|
|
1690
|
+
Find.prune
|
|
1691
|
+
elsif leaf_dirs.include?(path)
|
|
1692
|
+
Find.prune
|
|
1693
|
+
end
|
|
1694
|
+
end
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
root = Pathname.new(Autoproj.root_dir)
|
|
1698
|
+
Autoproj.progress
|
|
1699
|
+
Autoproj.progress "The following directories are not part of a package used in the current autoproj installation", :bold
|
|
1700
|
+
unused.to_a.sort.each do |dir|
|
|
1701
|
+
puts " #{Pathname.new(dir).relative_path_from(root)}"
|
|
1702
|
+
end
|
|
1703
|
+
end
|
|
1651
1704
|
end
|
|
1652
1705
|
end
|
|
1653
1706
|
|
data/lib/autoproj/manifest.rb
CHANGED
|
@@ -820,6 +820,14 @@ module Autoproj
|
|
|
820
820
|
end
|
|
821
821
|
end
|
|
822
822
|
|
|
823
|
+
|
|
824
|
+
# Call this method to ignore a specific package. It must not be used in
|
|
825
|
+
# init.rb, as the manifest is not yet loaded then
|
|
826
|
+
def ignore_package(package_name)
|
|
827
|
+
list = (data['ignore_packages'] ||= Array.new)
|
|
828
|
+
list << package_name
|
|
829
|
+
end
|
|
830
|
+
|
|
823
831
|
# True if the given package should not be built, with the packages that
|
|
824
832
|
# depend on him have this dependency met.
|
|
825
833
|
#
|
data/lib/autoproj/osdeps.rb
CHANGED
|
@@ -156,7 +156,7 @@ module Autoproj
|
|
|
156
156
|
#
|
|
157
157
|
# Examples: ['debian', ['sid', 'unstable']] or ['ubuntu', ['lucid lynx', '10.04']]
|
|
158
158
|
def self.operating_system
|
|
159
|
-
if
|
|
159
|
+
if !@operating_system.nil?
|
|
160
160
|
return @operating_system
|
|
161
161
|
elsif Autoproj.has_config_key?('operating_system')
|
|
162
162
|
os = Autoproj.user_config('operating_system')
|
|
@@ -169,19 +169,28 @@ module Autoproj
|
|
|
169
169
|
end
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
if user_os = ENV['AUTOPROJ_OS']
|
|
173
|
+
if user_os.empty?
|
|
174
|
+
@operating_system = false
|
|
175
|
+
else
|
|
176
|
+
names, versions = user_os.split(':')
|
|
177
|
+
@operating_system = [names.split(','), versions.split(',')]
|
|
178
|
+
end
|
|
179
|
+
else
|
|
180
|
+
Autoproj.progress " autodetecting the operating system"
|
|
181
|
+
name, versions = os_from_lsb
|
|
182
|
+
if name
|
|
183
|
+
if name != "debian"
|
|
184
|
+
if File.exists?("/etc/debian_version")
|
|
185
|
+
@operating_system = [[name, "debian"], versions]
|
|
186
|
+
else
|
|
187
|
+
@operating_system = [[name], versions]
|
|
188
|
+
end
|
|
180
189
|
end
|
|
181
190
|
end
|
|
182
191
|
end
|
|
183
192
|
|
|
184
|
-
if
|
|
193
|
+
if @operating_system.nil?
|
|
185
194
|
# Need to do some heuristics unfortunately
|
|
186
195
|
@operating_system =
|
|
187
196
|
if File.exists?('/etc/debian_version')
|
|
@@ -235,12 +244,27 @@ module Autoproj
|
|
|
235
244
|
if !@dpkg_installed_packages
|
|
236
245
|
@dpkg_installed_packages = Set.new
|
|
237
246
|
dpkg_status = File.readlines('/var/lib/dpkg/status')
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
247
|
+
|
|
248
|
+
current_packages = []
|
|
249
|
+
is_installed = false
|
|
250
|
+
dpkg_status.each do |line|
|
|
251
|
+
line = line.chomp
|
|
252
|
+
if line == ""
|
|
253
|
+
if is_installed
|
|
254
|
+
current_packages.each do |pkg|
|
|
255
|
+
@dpkg_installed_packages << pkg
|
|
256
|
+
end
|
|
257
|
+
current_packages.clear
|
|
258
|
+
is_installed = false
|
|
242
259
|
end
|
|
260
|
+
elsif line =~ /Package: (.*)$/
|
|
261
|
+
current_packages << $1
|
|
262
|
+
elsif line =~ /Provides: (.*)$/
|
|
263
|
+
current_packages << $1
|
|
264
|
+
elsif line == "Status: install ok installed"
|
|
265
|
+
is_installed = true
|
|
243
266
|
end
|
|
267
|
+
end
|
|
244
268
|
end
|
|
245
269
|
|
|
246
270
|
if package_name =~ /^(\w[a-z0-9+-.]+)/
|
|
@@ -311,6 +335,10 @@ fi
|
|
|
311
335
|
return NO_PACKAGE
|
|
312
336
|
end
|
|
313
337
|
|
|
338
|
+
if dep_def == 'ignore'
|
|
339
|
+
return IGNORE
|
|
340
|
+
end
|
|
341
|
+
|
|
314
342
|
if !os_names
|
|
315
343
|
return UNKNOWN_OS
|
|
316
344
|
end
|
|
@@ -600,6 +628,8 @@ Finally, OS dependencies can be installed by calling "autoproj osdeps"
|
|
|
600
628
|
with the corresponding option (--all, --ruby, --os or --none). Calling
|
|
601
629
|
"autoproj osdeps" without arguments will also give you information as
|
|
602
630
|
to what you should install to compile the software successfully.
|
|
631
|
+
|
|
632
|
+
So, what do you want ? (ruby or none)
|
|
603
633
|
EOT
|
|
604
634
|
message = [ "Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (ruby, none) ?", long_doc.strip ]
|
|
605
635
|
|
|
@@ -637,6 +667,8 @@ an autoproj operation with the --reconfigure option (e.g. autoproj update
|
|
|
637
667
|
|
|
638
668
|
Finally, OS dependencies can be installed by calling "autoproj osdeps"
|
|
639
669
|
with the corresponding option (--all, --ruby, --os or --none).
|
|
670
|
+
|
|
671
|
+
So, what do you want ? (all, ruby, os or none)
|
|
640
672
|
EOT
|
|
641
673
|
message = [ "Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (all, ruby, os, none) ?", long_doc.strip ]
|
|
642
674
|
|
|
@@ -726,7 +758,7 @@ with the corresponding option (--all, --ruby, --os or --none).
|
|
|
726
758
|
def osdeps_interaction_unknown_os(osdeps)
|
|
727
759
|
puts <<-EOMSG
|
|
728
760
|
#{Autoproj.color("The build process requires some other software packages to be installed on our operating system", :bold)}
|
|
729
|
-
#{Autoproj.color("If they are already installed, simply ignore this message", :red)}
|
|
761
|
+
#{Autoproj.color("If they are already installed, simply ignore this message", :red)}
|
|
730
762
|
|
|
731
763
|
#{osdeps.join("\n ")}
|
|
732
764
|
|
data/lib/autoproj/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autoproj
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
5
|
-
prerelease:
|
|
4
|
+
hash: 25
|
|
5
|
+
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 7
|
|
9
|
-
-
|
|
10
|
-
version: 1.7.
|
|
9
|
+
- 9
|
|
10
|
+
version: 1.7.9
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Sylvain Joyeux
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-05-02 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -156,21 +156,21 @@ description: |-
|
|
|
156
156
|
provides an easy integration of the local operating system (Debian, Ubuntu,
|
|
157
157
|
Fedora, maybe MacOSX at some point).
|
|
158
158
|
|
|
159
|
-
This tool has been
|
|
160
|
-
(http://
|
|
159
|
+
This tool has been over the years. It is now maintained in the frame of the Rock
|
|
160
|
+
robotics project (http://rock-robotics.org), to install robotics-related
|
|
161
161
|
software -- that is often bleeding edge. Unlike [the ROS build
|
|
162
162
|
system](http://ros.org), it is not bound to one build system, one VCS and one
|
|
163
163
|
integration framework. The philosophy behind autoproj
|
|
164
164
|
is:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
165
|
+
* supports both CMake and autotools, and can be adapted to other tools
|
|
166
|
+
* supports different VCS: cvs, svn, git, plain tarballs.
|
|
167
|
+
* software packages are plain packages, meaning that they can be built and
|
|
168
|
+
installed /outside/ an autoproj tree, and are not tied *at all* to the
|
|
169
|
+
autoproj build system.
|
|
170
|
+
* leverage the actual OS package management system. Right now, only Debian-like
|
|
171
|
+
systems (like Ubuntu) are supported, simply because it is the only one I have
|
|
172
|
+
access to.
|
|
173
|
+
* handle code generation properly
|
|
174
174
|
email:
|
|
175
175
|
- sylvain.joyeux@dfki.de
|
|
176
176
|
executables:
|
|
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
253
253
|
requirements: []
|
|
254
254
|
|
|
255
255
|
rubyforge_project: autobuild
|
|
256
|
-
rubygems_version: 1.
|
|
256
|
+
rubygems_version: 1.6.2
|
|
257
257
|
signing_key:
|
|
258
258
|
specification_version: 3
|
|
259
259
|
summary: Easy installation and management of robotics software
|