autobuild 1.7.4 → 1.7.5

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.
@@ -379,7 +379,7 @@ module Autobuild
379
379
  message "%s: #{l}", :magenta
380
380
  end
381
381
  if warning_count > 0
382
- progress_done "built %s (#{warning_count} warnings)"
382
+ progress_done "built %s #{Autoproj.color("(#{warning_count} warnings)", :bold)}"
383
383
  else
384
384
  progress_done "built %s"
385
385
  end
@@ -18,6 +18,9 @@ module Autobuild
18
18
 
19
19
  def initialize(level)
20
20
  @rio, @wio = IO.pipe
21
+ # Clearing cloexec
22
+ rio.fcntl(Fcntl::F_SETFD, 0)
23
+ wio.fcntl(Fcntl::F_SETFD, 0)
21
24
  put(level)
22
25
  end
23
26
  def get(token_count = 1)
@@ -214,23 +214,23 @@ module Autobuild::Subprocess
214
214
  end
215
215
  cread, cwrite = IO.pipe # to control that exec goes well
216
216
 
217
- if Autoproj::OSDependencies.operating_system[0].include?("windows")
218
- olddir = Dir.pwd
219
- if options[:working_directory] && (options[:working_directory] != Dir.pwd)
220
- Dir.chdir(options[:working_directory])
221
- end
222
- system(*command)
223
- result=$?.success?
224
- if(!result)
225
- error = Autobuild::SubcommandFailed.new(target, command.join(" "), logname, "Systemcall")
226
- error.phase = phase
227
- raise error
228
- end
229
- Dir.chdir(olddir)
230
- return
231
- end
232
-
233
- cwrite.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
217
+ if Autobuild.windows?
218
+ olddir = Dir.pwd
219
+ if options[:working_directory] && (options[:working_directory] != Dir.pwd)
220
+ Dir.chdir(options[:working_directory])
221
+ end
222
+ system(*command)
223
+ result=$?.success?
224
+ if(!result)
225
+ error = Autobuild::SubcommandFailed.new(target, command.join(" "), logname, "Systemcall")
226
+ error.phase = phase
227
+ raise error
228
+ end
229
+ Dir.chdir(olddir)
230
+ return
231
+ end
232
+
233
+ cwrite.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
234
234
 
235
235
  pid = fork do
236
236
  begin
@@ -258,7 +258,7 @@ module Autobuild::Subprocess
258
258
  $stdin.reopen(pread)
259
259
  end
260
260
 
261
- exec(*command)
261
+ exec(*command, :close_others => false)
262
262
  rescue Errno::ENOENT
263
263
  cwrite.write([CONTROL_COMMAND_NOT_FOUND].pack('I'))
264
264
  exit(100)
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.7.4" unless defined? Autobuild::VERSION
2
+ VERSION = "1.7.5" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-18 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -177,8 +177,8 @@ signing_key:
177
177
  specification_version: 3
178
178
  summary: Library to handle build systems and import mechanisms
179
179
  test_files:
180
- - test/test_import_tar.rb
181
- - test/test_subcommand.rb
180
+ - test/test_import_cvs.rb
182
181
  - test/test_reporting.rb
182
+ - test/test_subcommand.rb
183
183
  - test/test_import_svn.rb
184
- - test/test_import_cvs.rb
184
+ - test/test_import_tar.rb