openbsd-ports/lang/rubinius/patches/patch-lib_fileutils_rb
jeremy e128de9792 Rubinius is an implementation of the Ruby programming language.
The Rubinius bytecode virtual machine is written in C++, incorporating
LLVM to compile bytecode to machine code at runtime. The bytecode
compiler and vast majority of the core classes are written in pure Ruby.

To interact with the rest of the system, the VM provides primitives
which can be attached to methods and invoked. Additionally, FFI provides
a direct call path to most C functions.

Rubinius uses a precise, compacting, generational garbage collector. It
includes a compatible C-API for C extensions written for the standard
Ruby interpreter (often referred to as MRI.Matz's Ruby Implementation).

OK landry@, sthen@
2010-11-19 17:51:44 +00:00

27 lines
988 B
Plaintext

$OpenBSD: patch-lib_fileutils_rb,v 1.1.1.1 2010/11/19 17:51:44 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 Fri Oct 8 08:52:53 2010
+++ lib/fileutils.rb Fri Oct 8 08:58:40 2010
@@ -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