1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 917_avoid_ioseek.dpatch by Daigo Moriwaki <daigo@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: A work around for Bug#406388.
8
diff -urNad ruby-1.9.0-0~/lib/rubygems/package.rb ruby-1.9.0-0/lib/rubygems/package.rb
9
--- ruby-1.9.0-0~/lib/rubygems/package.rb 2007-12-20 17:39:12.000000000 +0900
10
+++ ruby-1.9.0-0/lib/rubygems/package.rb 2007-12-26 22:01:46.000000000 +0900
14
skip = (512 - (size % 512)) % 512
15
- if @io.respond_to? :seek
17
- @io.seek(size - entry.bytes_read, IO::SEEK_CUR)
19
+ #if @io.respond_to? :seek
20
+ # # avoid reading...
21
+ # @io.seek(size - entry.bytes_read, IO::SEEK_CUR)
23
pending = size - entry.bytes_read
25
bread = @io.read([pending, 4096].min).size
26
raise UnexpectedEOF if @io.eof?
31
@io.read(skip) # discard trailing zeros
32
# make sure nobody can use #read, #getc or #rewind anymore