SOURCES: rake-ruby-1.8.4.patch (NEW) - added

aredridel aredridel at pld-linux.org
Tue Jan 3 06:11:18 CET 2006


Author: aredridel                    Date: Tue Jan  3 05:11:18 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added

---- Files affected:
SOURCES:
   rake-ruby-1.8.4.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/rake-ruby-1.8.4.patch
diff -u /dev/null SOURCES/rake-ruby-1.8.4.patch:1.1
--- /dev/null	Tue Jan  3 06:11:18 2006
+++ SOURCES/rake-ruby-1.8.4.patch	Tue Jan  3 06:11:12 2006
@@ -0,0 +1,104 @@
+Mon Jan  2 21:52:41 MST 2006  Aredridel <aredridel at nbtsc.org>
+  * Fix noop error in 1.8.4
+Mon Jan  2 21:50:26 MST 2006  Aredridel <aredridel at nbtsc.org>
+  tagged 0.6.2
+diff -rN -u old-rake/lib/rake.rb new-rake/lib/rake.rb
+--- old-rake/lib/rake.rb	2006-01-02 21:58:23.000000000 -0700
++++ new-rake/lib/rake.rb	2006-01-02 21:58:23.000000000 -0700
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env ruby
+ 
+ #--
+-# Copyright (c) 2003, 2004 Jim Weirich
++# Copyright (c) 2003, 2004, 2005 Jim Weirich
+ #
+ # Permission is hereby granted, free of charge, to any person obtaining
+ # a copy of this software and associated documentation files (the
+@@ -624,20 +624,32 @@
+ #
+ module RakeFileUtils
+   include FileUtils
++
++  class << self
++    attr_accessor :verbose_flag, :nowrite_flag
++  end
++  RakeFileUtils.verbose_flag = true
++  RakeFileUtils.nowrite_flag = false
+   
+-  $fileutils_output  = $stderr
+-  $fileutils_label   = ''
+   $fileutils_verbose = true
+   $fileutils_nowrite = false
+   
+   FileUtils::OPT_TABLE.each do |name, opts|
+-    next unless opts.include?('verbose')
++    default_options = []
++    if opts.include?('verbose')
++      default_options << ':verbose => RakeFileUtils.verbose_flag'
++    end
++    if opts.include?('noop')
++      default_options << ':noop => RakeFileUtils.nowrite_flag'
++    end
++
++    next if default_options.empty?
+     module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+     def #{name}( *args, &block )
+-      super(*fu_merge_option(args,
+-          :verbose => $fileutils_verbose,
+-          :noop => $fileutils_nowrite),
+-        &block)
++      super(
++	*fu_merge_option(args,
++	  #{default_options.join(', ')}
++	  ), &block)
+     end
+     EOS
+   end
+@@ -652,16 +664,16 @@
+   #    verbose(v) { code }  # Execute code with the verbose flag set temporarily to _v_.
+   #                         # Return to the original value when code is done.
+   def verbose(value=nil)
+-    oldvalue = $fileutils_verbose
+-    $fileutils_verbose = value unless value.nil?
++    oldvalue = RakeFileUtils.verbose_flag
++    RakeFileUtils.verbose_flag = value unless value.nil?
+     if block_given?
+       begin
+         yield
+       ensure
+-        $fileutils_verbose = oldvalue
++        RakeFileUtils.verbose_flag = oldvalue
+       end
+     end
+-    $fileutils_verbose
++    RakeFileUtils.verbose_flag
+   end
+ 
+   # Get/set the nowrite flag controlling output from the FileUtils
+@@ -674,13 +686,13 @@
+   #    nowrite(v) { code }  # Execute code with the nowrite flag set temporarily to _v_.
+   #                         # Return to the original value when code is done.
+   def nowrite(value=nil)
+-    oldvalue = $fileutils_nowrite
+-    $fileutils_nowrite = value unless value.nil?
++    oldvalue = RakeFileUtils.nowrite_flag
++    RakeFileUtils.nowrite_flag = value unless value.nil?
+     if block_given?
+       begin
+         yield
+       ensure
+-        $fileutils_nowrite = oldvalue
++	RakeFileUtils.nowrite_flag = oldvalue
+       end
+     end
+     oldvalue
+@@ -701,7 +713,7 @@
+   # instead of actually building the project.
+   #
+   def when_writing(msg=nil)
+-    if $fileutils_nowrite
++    if RakeFileUtils.nowrite_flag
+       puts "DRYRUN: #{msg}" if msg
+     else
+       yield
+
================================================================


More information about the pld-cvs-commit mailing list