The following commit has been merged in the lenny branch:
commit 808ff71b8205aeb84cd8607c05fb5e906e78a401
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Sat Jun 7 22:08:05 2008 +0200
dpkg-source: accept patches with missing context at the end
* scripts/Dpkg/Source/Patch.pm (analyze): Accept unexpected
end-of-file in patches if we're missing no more than 2 lines
of context. Output a warning instead.
diff --git a/ChangeLog b/ChangeLog
index 7226c04..59f5007 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-06-07 Raphael Hertzog <[EMAIL PROTECTED]>
+ * scripts/Dpkg/Source/Patch.pm (analyze): Accept unexpected
+ end-of-file in patches if we're missing no more than 2 lines
+ of context. Output a warning instead.
+
+2008-06-07 Raphael Hertzog <[EMAIL PROTECTED]>
+
* scripts/Dpkg/Source/Package/V3/quilt.pm (register_autopatch):
Register the newly created patch with quilt only if quilt has
already been used to apply the existing patches (or if we don't
diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm
index 4248493..052389d 100644
--- a/scripts/Dpkg/Source/Patch.pm
+++ b/scripts/Dpkg/Source/Patch.pm
@@ -368,7 +368,12 @@ sub analyze {
# read hunk
while ($olines || $nlines) {
unless (defined($_ = getline($diff_handle))) {
- error(_g("unexpected end of diff `%s'"), $diff);
+ if (($olines == $nlines) and ($olines < 3)) {
+ warning(_g("unexpected end of diff `%s'"), $diff);
+ last;
+ } else {
+ error(_g("unexpected end of diff `%s'"), $diff);
+ }
}
next if /^\\ No newline/;
# Check stats
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]