~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to debian/patches/917_avoid_ioseek.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 917_avoid_ioseek.dpatch by Daigo Moriwaki <daigo@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: A work around for Bug#406388.
 
6
 
 
7
@DPATCH@
 
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
 
11
@@ -444,17 +444,17 @@
 
12
         size = entry.size
 
13
         yield entry
 
14
         skip = (512 - (size % 512)) % 512
 
15
-        if @io.respond_to? :seek
 
16
-          # avoid reading...
 
17
-          @io.seek(size - entry.bytes_read, IO::SEEK_CUR)
 
18
-        else
 
19
+        #if @io.respond_to? :seek
 
20
+        #  # avoid reading...
 
21
+        #  @io.seek(size - entry.bytes_read, IO::SEEK_CUR)
 
22
+        #else
 
23
           pending = size - entry.bytes_read
 
24
           while pending > 0
 
25
             bread = @io.read([pending, 4096].min).size
 
26
             raise UnexpectedEOF if @io.eof?
 
27
             pending -= bread
 
28
           end
 
29
-        end
 
30
+        #end
 
31
         @io.read(skip) # discard trailing zeros
 
32
         # make sure nobody can use #read, #getc or #rewind anymore
 
33
         entry.close