openbsd-ports/lang/rubinius/patches/patch-lib_fileutils_rb
jeremy 22c1a10e51 Bump version to 1.2.2. Fixes building some rbx-* ports with systrace
enabled.  Fix the hardcoding of the OpenBSD version in the PLIST.

OK landry@
2011-03-10 20:40:33 +00:00

27 lines
984 B
Plaintext

$OpenBSD: patch-lib_fileutils_rb,v 1.3 2011/03/10 20:40:33 jeremy Exp $
Make FileUtils.mkdir_p act more like mkdir(1) -p, by not attempting
to create directories that already exist. This fixes systrace
warnings when building ports.
--- lib/fileutils.rb.orig Tue Feb 22 15:02:08 2011
+++ lib/fileutils.rb Wed Feb 23 14:03:36 2011
@@ -201,7 +201,7 @@ module FileUtils
list.map {|path| path.sub(%r</\z>, '') }.each do |path|
# optimize for the most common case
begin
- fu_mkdir path, options[:mode]
+ fu_mkdir path, options[:mode] unless File.directory?(path)
next
rescue SystemCallError
next if File.directory?(path)
@@ -214,7 +214,7 @@ module FileUtils
end
stack.reverse_each do |path|
begin
- fu_mkdir path, options[:mode]
+ fu_mkdir path, options[:mode] unless File.directory?(path)
rescue SystemCallError => err
raise unless File.directory?(path)
end