This patch works with the smalleiffel package, which had been falling over this bug.
------- Forwarded Message Date: Mon, 11 Jan 1999 20:07:46 -0500 From: Ben Collins <[EMAIL PROTECTED]> To: Oliver Elphick <[email protected]> cc: [email protected] Subject: Re: Perl expert wanted to solve dpkg-source bug#16415, please - --Y7xTucakfITjPcLV Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" - --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii On Mon, Jan 11, 1999 at 10:57:40PM +0000, Oliver Elphick wrote: > I need a solution to this dpkg-source bug, because it is preventing > one of my packages from being extracted. Damnit, scratch the last patch. It works but doesn't take errors into account as well as it should. This is the "better" one. :) sorry for not testing it as much as i should have. - -- - ----- -- - -------- --------- ---- ------- ----- - - --- -------- Ben Collins <[EMAIL PROTECTED]> Debian GNU/Linux UnixGroup Admin - Jordan Systems Inc. [EMAIL PROTECTED] - ------ -- ----- - - ------- ------- -- The Choice of the GNU Generation - --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dpkg-source.diff" - --- /usr/bin/dpkg-source Sun Nov 1 12:50:44 1998 +++ dpkg-source Mon Jan 11 20:03:25 1999 @@ -511,7 +511,31 @@ $/="\n"; while (<GZIP>) { s/\n$// || &error("diff is missing trailing newline"); - - if (/^--- /) { + if (/[EMAIL PROTECTED]@ .* [EMAIL PROTECTED]@$/) { + @patch_args = split(' ', $_); + ($dump, $after_lines) = split(',', $patch_args[2]); + if ($after_lines eq "") { $after_lines = $dump; } + ($dump, $before_lines) = split(',', $patch_args[1]); + $count_before = 0; + $count_after = 0; + while ($after_lines > $count_after || $before_lines > $count_be fore) { + $_= <GZIP>; s/\n$// || + &error("diff finishes in middle of file patch (line $.) "); + if (/^\+/) { + $count_after++; + } elsif (/^-/) { + $count_before++; + } elsif (/^ /) { + $count_after++; + $count_before++; + } elsif (/^@/) { + &error("premature finish to file patch (line $.)"); + } elsif (/^\\ No newline at end of file$/) { + } else { + &error ("diff contains unknown line \`$_'"); + } + } + } elsif (/^--- /) { $fn= $'; substr($fn,0,length($expectprefix)+1) eq "$expectprefix/" || &error("diff patches file ($fn) not in expected subdirecto ry"); @@ -529,9 +553,8 @@ &error("line after --- for file $fn isn't as expected"); $filepatched{$fn}++ && &error("diff patches file $fn twice"); } elsif (/^\\ No newline at end of file$/) { - - } elsif (/^[-+ [EMAIL PROTECTED]/) { } else { - - &error ("diff contains unknown line \`$_'"); + &error ("diff contains unknown line \`$_' (line $.)"); } } close(GZIP); - --ibTvN161/egqYuK8-- - --Y7xTucakfITjPcLV Content-Type: application/pgp-signature - -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia iQCVAwUBNpqgYio9WkFm9rsJAQGhJQP/VYr4gTWMJvTfG7LXTN2vJcuCeYZVuDpe XvpVJHU5uvzqmKbPA8N4Ov1DF9zWRpKfGgyVLfacYslkJgSGoNU5NLpw6n2ZmP5L HsAnRwKMPchdfOeNbHMJKw4PiVUJtL/kA1PdYy6sDDFgWw+iGATtXsdgRDoB1GWl L4MvnNYUmxI= =1Ltw - -----END PGP SIGNATURE----- - --Y7xTucakfITjPcLV-- - -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] ------- End of Forwarded Message -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "For the LORD is good; his mercy is everlasting; and his truth endureth to all generations." Psalms 100:5

