autoproj 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ = Version 1.2.6
2
+ * Fix mail reporting
3
+
1
4
  = Version 1.2.5
2
5
  * Quickfix release: fix "autoproj bootstrap VCS URL"
3
6
 
data/bin/autoproj CHANGED
@@ -90,22 +90,22 @@ Additional options:
90
90
  exit
91
91
  end
92
92
  opts.on("--mail-from EMAIL", String, "From: field of the sent mails") do |from_email|
93
- mail[:from] = from_email
93
+ mail_config[:from] = from_email
94
94
  end
95
95
  opts.on("--mail-to EMAILS", String, "comma-separated list of emails to which the reports should be sent") do |emails|
96
- mail[:to] ||= []
97
- mail[:to] += emails.split(',')
96
+ mail_config[:to] ||= []
97
+ mail_config[:to] += emails.split(',')
98
98
  end
99
99
  opts.on("--mail-subject SUBJECT", String, "Subject: field of the sent mails") do |subject_email|
100
- mail[:subject] = subject_email
100
+ mail_config[:subject] = subject_email
101
101
  end
102
102
  opts.on("--mail-smtp HOSTNAME", String, " address of the mail server written as hostname[:port]") do |smtp|
103
103
  raise "invalid SMTP specification #{smtp}" unless smtp =~ /^([^:]+)(?::(\d+))?$/
104
- mail[:smtp] = $1
105
- mail[:port] = Integer($2) if $2 && !$2.empty?
104
+ mail_config[:smtp] = $1
105
+ mail_config[:port] = Integer($2) if $2 && !$2.empty?
106
106
  end
107
107
  opts.on("--mail-only-errors", "send mail only on errors") do
108
- mail[:only_errors] = true
108
+ mail_config[:only_errors] = true
109
109
  end
110
110
  end
111
111
 
@@ -401,7 +401,7 @@ begin
401
401
  Autobuild.doc_errors = false
402
402
  Autobuild.do_doc = false
403
403
  if mail_config[:to]
404
- Autobuild::Reporting << MailReporter.new(mail_config)
404
+ Autobuild::Reporting << Autobuild::MailReporter.new(mail_config)
405
405
  end
406
406
 
407
407
  # First things first, see if we need to update ourselves
@@ -157,7 +157,7 @@ module Autoproj
157
157
 
158
158
  data = os_entry.last
159
159
  # This package does not need to be installed on this operating system (example: build tools on Gentoo)
160
- next if !data
160
+ next if !data || data == "ignore"
161
161
 
162
162
  if data.kind_of?(Hash)
163
163
  version_entry = data.find do |version_list, data|
@@ -187,21 +187,29 @@ module Autoproj
187
187
  "\n" + shell_snippets
188
188
  end
189
189
 
190
- def partition_packages(package_set)
190
+ # call-seq:
191
+ # partition_packages(package_names) => os_packages, gem_packages
192
+ def partition_packages(package_set, package_osdeps = Hash.new)
191
193
  package_set = package_set.to_set
192
194
  osdeps, gems = [], []
193
195
  package_set.to_set.each do |name|
194
196
  pkg_def = definitions[name]
195
197
  if !pkg_def
196
- raise ConfigError, "I know nothing about a prepackaged '#{name}' software"
198
+ msg = "I know nothing about a prepackaged software called '#{name}'"
199
+ if pkg_names = package_osdeps[name]
200
+ msg += ", it is listed as dependency of the following package(s): #{pkg_names.join(", ")}"
201
+ end
202
+
203
+ raise ConfigError, msg
197
204
  end
198
205
 
199
206
  if pkg_def.respond_to?(:to_str)
200
207
  case(pkg_def.to_str)
208
+ when "ignore" then
201
209
  when "gem" then
202
210
  gems << name
203
211
  else
204
- raise ConfigError, "unknown OS-independent package management type #{pkg_def}"
212
+ raise ConfigError, "unknown OS-independent package management type #{pkg_def} for #{name}"
205
213
  end
206
214
  else
207
215
  osdeps << name
@@ -210,8 +218,9 @@ module Autoproj
210
218
  return osdeps, gems
211
219
  end
212
220
 
213
- def install(packages)
214
- osdeps, gems = partition_packages(packages)
221
+ # Requests the installation of the given set of packages
222
+ def install(packages, package_osdeps = Hash.new)
223
+ osdeps, gems = partition_packages(packages, package_osdeps)
215
224
 
216
225
  did_something = false
217
226
 
@@ -278,6 +287,8 @@ end
278
287
 
279
288
  DEFS = <<EODEFS
280
289
  # The following definitions are needed to bootstrap autoproj
290
+ none: ignore
291
+
281
292
  ruby:
282
293
  debian,ubuntu:
283
294
  - ruby1.8-dev
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
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.5
4
+ version: 1.2.6
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-28 00:00:00 +01:00
12
+ date: 2009-12-22 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ">="
92
92
  - !ruby/object:Gem::Version
93
- version: 2.3.3
93
+ version: 2.4.0
94
94
  version:
95
95
  description: |-
96
96
  What is Autoproj