autoproj 1.2.6 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +1 -0
- data/README.txt +32 -9
- data/bin/autoproj +225 -176
- data/doc/guide/src/autobuild.page +1 -1
- data/doc/guide/src/customization.page +5 -5
- data/doc/guide/src/error_messages.page +16 -0
- data/doc/guide/src/index.page +32 -9
- data/doc/guide/src/source_yml.page +38 -17
- data/doc/guide/src/structure.page +1 -1
- data/lib/autoproj/autobuild.rb +6 -0
- data/lib/autoproj/default.osdeps +6 -0
- data/lib/autoproj/manifest.rb +147 -42
- data/lib/autoproj/osdeps.rb +16 -7
- data/lib/autoproj/system.rb +8 -2
- data/lib/autoproj/version.rb +1 -1
- data/samples/autoproj/manifest +5 -1
- metadata +3 -2
data/lib/autoproj/osdeps.rb
CHANGED
@@ -111,7 +111,7 @@ module Autoproj
|
|
111
111
|
|
112
112
|
data = os_entry.last
|
113
113
|
# This package does not need to be installed on this operating system (example: build tools on Gentoo)
|
114
|
-
next if !data
|
114
|
+
next if !data || data == "ignore"
|
115
115
|
|
116
116
|
if data.kind_of?(Hash)
|
117
117
|
version_entry = data.find do |version_list, data|
|
@@ -141,21 +141,29 @@ module Autoproj
|
|
141
141
|
"\n" + shell_snippets
|
142
142
|
end
|
143
143
|
|
144
|
-
|
144
|
+
# call-seq:
|
145
|
+
# partition_packages(package_names) => os_packages, gem_packages
|
146
|
+
def partition_packages(package_set, package_osdeps = Hash.new)
|
145
147
|
package_set = package_set.to_set
|
146
148
|
osdeps, gems = [], []
|
147
149
|
package_set.to_set.each do |name|
|
148
150
|
pkg_def = definitions[name]
|
149
151
|
if !pkg_def
|
150
|
-
|
152
|
+
msg = "I know nothing about a prepackaged software called '#{name}'"
|
153
|
+
if pkg_names = package_osdeps[name]
|
154
|
+
msg += ", it is listed as dependency of the following package(s): #{pkg_names.join(", ")}"
|
155
|
+
end
|
156
|
+
|
157
|
+
raise ConfigError, msg
|
151
158
|
end
|
152
159
|
|
153
160
|
if pkg_def.respond_to?(:to_str)
|
154
161
|
case(pkg_def.to_str)
|
162
|
+
when "ignore" then
|
155
163
|
when "gem" then
|
156
164
|
gems << name
|
157
165
|
else
|
158
|
-
raise ConfigError, "unknown OS-independent package management type #{pkg_def}"
|
166
|
+
raise ConfigError, "unknown OS-independent package management type #{pkg_def} for #{name}"
|
159
167
|
end
|
160
168
|
else
|
161
169
|
osdeps << name
|
@@ -164,8 +172,9 @@ module Autoproj
|
|
164
172
|
return osdeps, gems
|
165
173
|
end
|
166
174
|
|
167
|
-
|
168
|
-
|
175
|
+
# Requests the installation of the given set of packages
|
176
|
+
def install(packages, package_osdeps = Hash.new)
|
177
|
+
osdeps, gems = partition_packages(packages, package_osdeps)
|
169
178
|
|
170
179
|
did_something = false
|
171
180
|
|
@@ -187,7 +196,7 @@ module Autoproj
|
|
187
196
|
end
|
188
197
|
Autobuild.progress "installing/updating OS dependencies: #{osdeps.join(", ")}"
|
189
198
|
begin
|
190
|
-
Autobuild::Subprocess.run 'autoproj', 'osdeps', 'bash', '
|
199
|
+
Autobuild::Subprocess.run 'autoproj', 'osdeps', '/bin/bash', File.expand_path('osdeps.sh')
|
191
200
|
ensure
|
192
201
|
FileUtils.rm_f 'osdeps.sh'
|
193
202
|
end
|
data/lib/autoproj/system.rb
CHANGED
@@ -53,8 +53,14 @@ module Autoproj
|
|
53
53
|
Autoproj.env_set 'LD_LIBRARY_PATH'
|
54
54
|
end
|
55
55
|
|
56
|
-
def self.export_env_sh(subdir)
|
57
|
-
|
56
|
+
def self.export_env_sh(subdir = nil)
|
57
|
+
filename = if subdir
|
58
|
+
File.join(Autoproj.root_dir, subdir, "env.sh")
|
59
|
+
else
|
60
|
+
File.join(Autoproj.root_dir, "env.sh")
|
61
|
+
end
|
62
|
+
|
63
|
+
File.open(filename, "w") do |io|
|
58
64
|
Autobuild.environment.each do |name, value|
|
59
65
|
shell_line = "export #{name}=#{value.join(":")}"
|
60
66
|
if Autoproj.env_inherit?(name)
|
data/lib/autoproj/version.rb
CHANGED
data/samples/autoproj/manifest
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# List of VCS information or subdirectories of autoproj/ in which to find
|
2
2
|
# package set definitions.
|
3
3
|
package_sets:
|
4
|
-
#
|
4
|
+
# Examples from the RubyInMotion package sets
|
5
|
+
# - type: git
|
6
|
+
# url: git://github.com/doudou/rubim.base.git
|
5
7
|
# - type: git
|
6
8
|
# url: git://github.com/doudou/rubim.orocos.git
|
9
|
+
# - type: git
|
10
|
+
# url: git://github.com/doudou/rubim.drivers.git
|
7
11
|
|
8
12
|
# The layout section specifies what to build, and where to build it (as a
|
9
13
|
# subdirectory of the root installation directory). In the example below, all
|
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.
|
4
|
+
version: 1.3.0
|
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-12-
|
12
|
+
date: 2009-12-23 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- doc/guide/src/customization.page
|
143
143
|
- doc/guide/src/default.css
|
144
144
|
- doc/guide/src/default.template
|
145
|
+
- doc/guide/src/error_messages.page
|
145
146
|
- doc/guide/src/htmldoc.metainfo
|
146
147
|
- doc/guide/src/htmldoc.virtual
|
147
148
|
- doc/guide/src/images/bodybg.png
|