autobuild 1.5.32 → 1.5.33
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.txt +5 -0
- data/lib/autobuild/importer.rb +3 -3
- data/lib/autobuild/package.rb +8 -2
- data/lib/autobuild/subcommand.rb +9 -4
- data/lib/autobuild/version.rb +1 -1
- metadata +4 -4
data/Changes.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== Version 1.5.33
|
2
|
+
* fix autobuild failing if the generated documentation
|
3
|
+
is not in the doc_dir, as expected. It now reports
|
4
|
+
a warning, as it should
|
5
|
+
|
1
6
|
== Version 1.5.32
|
2
7
|
* autobuild importers delete the source directory when
|
3
8
|
initial checkouts fail. They now display a message
|
data/lib/autobuild/importer.rb
CHANGED
@@ -88,7 +88,7 @@ class Importer
|
|
88
88
|
update(package)
|
89
89
|
patch(package)
|
90
90
|
package.updated = true
|
91
|
-
rescue Exception => e
|
91
|
+
rescue ::Exception => e
|
92
92
|
fallback(e, package, :import, package)
|
93
93
|
end
|
94
94
|
else
|
@@ -110,7 +110,7 @@ class Importer
|
|
110
110
|
rescue Autobuild::Exception => e
|
111
111
|
FileUtils.rm_rf package.srcdir
|
112
112
|
fallback(e, package, :import, package)
|
113
|
-
rescue Exception
|
113
|
+
rescue ::Exception
|
114
114
|
package.progress "checkout of %s failed, deleting the source directory #{package.srcdir}"
|
115
115
|
FileUtils.rm_rf package.srcdir
|
116
116
|
raise
|
@@ -141,7 +141,7 @@ class Importer
|
|
141
141
|
def call_patch(package, reverse, file)
|
142
142
|
patch = Autobuild.tool('patch')
|
143
143
|
Dir.chdir(package.srcdir) do
|
144
|
-
Subprocess.run(package, :patch, patch, '-p0', (reverse ? '-R' : nil),
|
144
|
+
Subprocess.run(package, :patch, patch, '-p0', (reverse ? '-R' : nil), :input => file)
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
data/lib/autobuild/package.rb
CHANGED
@@ -194,7 +194,7 @@ module Autobuild
|
|
194
194
|
return if failed?
|
195
195
|
|
196
196
|
begin yield
|
197
|
-
rescue Exception => e
|
197
|
+
rescue ::Exception => e
|
198
198
|
@failures << e
|
199
199
|
if mark_as_failed
|
200
200
|
@failed = true
|
@@ -343,13 +343,15 @@ module Autobuild
|
|
343
343
|
install_doc
|
344
344
|
end
|
345
345
|
|
346
|
-
rescue Exception => e
|
346
|
+
rescue ::Exception => e
|
347
347
|
if Autobuild.doc_errors
|
348
348
|
raise
|
349
349
|
else
|
350
350
|
STDERR.puts "W: failed to generate documentation for #{name}"
|
351
351
|
if e.kind_of?(SubcommandFailed)
|
352
352
|
STDERR.puts "W: see #{e.logfile} for more details"
|
353
|
+
else
|
354
|
+
STDERR.puts "W: #{e.message}"
|
353
355
|
end
|
354
356
|
end
|
355
357
|
end
|
@@ -360,6 +362,10 @@ module Autobuild
|
|
360
362
|
end
|
361
363
|
|
362
364
|
def install_doc
|
365
|
+
if !File.directory?(self.doc_dir)
|
366
|
+
raise "#{self.doc_dir} was expected to be a directory, but it is not. Check the package's documentation generation, the generated documentation should be in #{self.doc_dir}"
|
367
|
+
end
|
368
|
+
|
363
369
|
doc_target_dir = self.doc_target_dir
|
364
370
|
doc_dir = self.doc_dir
|
365
371
|
FileUtils.rm_rf doc_target_dir
|
data/lib/autobuild/subcommand.rb
CHANGED
@@ -103,6 +103,14 @@ module Autobuild::Subprocess
|
|
103
103
|
def self.run(target, phase, *command)
|
104
104
|
STDOUT.sync = true
|
105
105
|
|
106
|
+
input_streams = []
|
107
|
+
if command.last.kind_of?(Hash)
|
108
|
+
options = command.pop
|
109
|
+
if options[:input]
|
110
|
+
input_streams = [options[:input]]
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
106
114
|
start_time = Time.now
|
107
115
|
|
108
116
|
# Filter nil and empty? in command
|
@@ -127,9 +135,6 @@ module Autobuild::Subprocess
|
|
127
135
|
puts "#{target_name}: running #{command.join(" ")}\n (output goes to #{logname})"
|
128
136
|
end
|
129
137
|
|
130
|
-
input_streams = command.collect { |o| $1 if o =~ /^\<(.+)/ }.compact
|
131
|
-
command.reject! { |o| o =~ /^\<(.+)/ }
|
132
|
-
|
133
138
|
open_flag = if Autobuild.keep_oldlogs then 'a'
|
134
139
|
elsif Autobuild.registered_logfile?(logname) then 'a'
|
135
140
|
else 'w'
|
@@ -184,7 +189,7 @@ module Autobuild::Subprocess
|
|
184
189
|
rescue Errno::ENOENT
|
185
190
|
cwrite.write([CONTROL_COMMAND_NOT_FOUND].pack('I'))
|
186
191
|
raise
|
187
|
-
rescue Exception
|
192
|
+
rescue ::Exception
|
188
193
|
cwrite.write([CONTROL_UNEXPECTED].pack('I'))
|
189
194
|
raise
|
190
195
|
end
|
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 65
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 33
|
10
|
+
version: 1.5.33
|
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-01
|
18
|
+
date: 2011-02-01 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|