ports/119051: [PATCH] devel/ruby18-gems: fix rubygem-* pkg-plist issue
Cheng-Lung Sung
clsung at FreeBSD.org
Thu Dec 27 01:40:02 UTC 2007
>Number: 119051
>Category: ports
>Synopsis: [PATCH] devel/ruby18-gems: fix rubygem-* pkg-plist issue
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 27 01:40:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Cheng-Lung Sung
>Release: FreeBSD 7.0-BETA1 amd64
>Organization:
FreeBSD @ Taiwan
>Environment:
System: FreeBSD going04.iis.sinica.edu.tw 7.0-BETA1 FreeBSD 7.0-BETA1 #8: Wed Oct 24 09:10:47 CST 2007
>Description:
- files/patch-lib-rubygems-config_file.rb
set DEFAULT_UPDATE_SOURCES = false
- default not to write to source_cache file
- files/patch-lib-rubygems-source_info_cache.rb
fix when try_file() write 4 bytes into source_cache even DEFAULT_UPDATE_SOURCES is false
- files/patch-lib-rubygems-installer.rb
- do not write to .require_paths file
- currently we don't need it
- bump PORTERVISION
- pointyhat to me again, cong....
Added file(s):
- files/patch-lib-rubygems-config_file.rb
- files/patch-lib-rubygems-installer.rb
- files/patch-lib-rubygems-source_info_cache.rb
Port maintainer (jw at innerewut.de) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- ruby18-gems-1.0.1_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/ruby-gems/Makefile,v
retrieving revision 1.18
diff -u -u -r1.18 Makefile
--- Makefile 26 Dec 2007 00:43:24 -0000 1.18
+++ Makefile 27 Dec 2007 01:36:34 -0000
@@ -7,7 +7,7 @@
PORTNAME= gems
PORTVERSION= 1.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel ruby
MASTER_SITES= ${MASTER_SITE_RUBYFORGE}
MASTER_SITE_SUBDIR= ruby${PORTNAME}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/devel/ruby-gems/pkg-plist,v
retrieving revision 1.13
diff -u -u -r1.13 pkg-plist
--- pkg-plist 26 Dec 2007 00:43:24 -0000 1.13
+++ pkg-plist 27 Dec 2007 01:36:34 -0000
@@ -1391,7 +1391,6 @@
@dirrm %%RUBY_SITELIBDIR%%/rubygems/commands
@dirrm %%RUBY_SITELIBDIR%%/rubygems
@dirrm %%RUBY_SITELIBDIR%%/rbconfig
- at dirrmtry lib/ruby/gems/%%RUBY_VER%%/source_cache
@dirrmtry lib/ruby/gems/%%RUBY_VER%%/specifications
@dirrm lib/ruby/gems/%%RUBY_VER%%/gems/sources-0.0.2/lib
@dirrm lib/ruby/gems/%%RUBY_VER%%/gems/sources-0.0.2
Index: files/patch-lib-rubygems-config_file.rb
===================================================================
RCS file: files/patch-lib-rubygems-config_file.rb
diff -N files/patch-lib-rubygems-config_file.rb
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-lib-rubygems-config_file.rb 27 Dec 2007 01:36:34 -0000
@@ -0,0 +1,11 @@
+--- lib/rubygems/config_file.rb.orig 2007-10-08 16:01:45.000000000 +0800
++++ lib/rubygems/config_file.rb 2007-12-26 11:39:36.000000000 +0800
+@@ -16,7 +16,7 @@
+ DEFAULT_BENCHMARK = false
+ DEFAULT_BULK_THRESHOLD = 1000
+ DEFAULT_VERBOSITY = true
+- DEFAULT_UPDATE_SOURCES = true
++ DEFAULT_UPDATE_SOURCES = false
+
+ # List of arguments supplied to the config file object.
+ attr_reader :args
Index: files/patch-lib-rubygems-installer.rb
===================================================================
RCS file: files/patch-lib-rubygems-installer.rb
diff -N files/patch-lib-rubygems-installer.rb
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-lib-rubygems-installer.rb 27 Dec 2007 01:36:34 -0000
@@ -0,0 +1,11 @@
+--- lib/rubygems/installer.rb.orig 2007-12-21 08:43:06.000000000 +0800
++++ lib/rubygems/installer.rb 2007-12-27 09:04:59.000000000 +0800
+@@ -134,7 +134,7 @@
+ build_extensions
+ write_spec
+
+- write_require_paths_file_if_needed
++ # write_require_paths_file_if_needed
+
+ # HACK remove? Isn't this done in multiple places?
+ cached_gem = File.join @gem_home, "cache", @gem.split(/\//).pop
Index: files/patch-lib-rubygems-source_info_cache.rb
===================================================================
RCS file: files/patch-lib-rubygems-source_info_cache.rb
diff -N files/patch-lib-rubygems-source_info_cache.rb
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-lib-rubygems-source_info_cache.rb 27 Dec 2007 01:36:34 -0000
@@ -0,0 +1,34 @@
+--- lib/rubygems/source_info_cache.rb.orig 2007-12-11 09:16:59.000000000 +0800
++++ lib/rubygems/source_info_cache.rb 2007-12-26 17:24:45.000000000 +0800
+@@ -70,6 +70,9 @@
+ begin
+ # Marshal loads 30-40% faster from a String, and 2MB on 20061116 is small
+ data = File.open cache_file, 'rb' do |fp| fp.read end
++ if data.length <= 4 then
++ raise ArgumentError, "Data too small"
++ end
+ @cache_data = Marshal.load data
+
+ @cache_data.each do |url, sice|
+@@ -85,11 +88,11 @@
+ end
+ end
+ @cache_data
+- rescue => e
++ rescue => ex
+ if Gem.configuration.really_verbose then
+ say "Exception during cache_data handling: #{ex.class} - #{ex}"
+ say "Cache file was: #{cache_file}"
+- say "\t#{e.backtrace.join "\n\t"}"
++ say "\t#{ex.backtrace.join "\n\t"}"
+ end
+ reset_cache_data
+ end
+@@ -107,6 +110,7 @@
+
+ def reset_cache_data
+ @cache_data = {}
++ FileUtils.rm @cache_file
+ end
+
+ # The name of the cache file to be read
--- ruby18-gems-1.0.1_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list