[SCM] Debian Qt/KDE packaging tools branch, master, updated. debian/0.6.6

Modestas Vainius modax at alioth.debian.org
Sun Feb 28 18:58:48 UTC 2010


The following commit has been merged in the master branch:
commit eaec1ad4092476f3be2ab749a257a3d5e46af7c5
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Thu Feb 25 15:31:18 2010 +0200

    Fix patch parsing when patches go one right after another.
---
 debian/changelog                                   |    1 +
 .../Debian/PkgKde/SymbolsHelper/Patching.pm        |   11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3d5e175..3c92c74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ pkg-kde-tools (0.6.6~pre2) UNRELEASED; urgency=low
   * Update code stolen from dpkg-dev to current git master.
   * pkgkde-deb2symbols: be quiet when dumping symbol file.
   * `pkgkde-symbolshelper batchpatch`: improve error messages.
+  * Fix patch parsing when patches go one right after another.
 
  -- Modestas Vainius <modax at debian.org>  Fri, 19 Feb 2010 20:30:09 +0200
 
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
index ab617ef..c1ccd12 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patching.pm
@@ -33,7 +33,12 @@ sub parse_patches_from_handle {
 	$reparse_line = 0;
 	if (defined $patch) {
 	    if ($patch->has_header()) {
-		if (m/^(?:[+ -]|@@ )/) {
+		if (m/^@@ /) {
+		    unless ($patch->is_valid()) {
+			warning("patch '".$patch->get_name()."' hunk is invalid at line $.");
+		    }
+		    $patch->append_line($_);
+		} elsif (!$patch->is_valid() && m/^[+ -]/) {
 		    # Patch continues
 		    $patch->append_line($_);
 		} else {
@@ -41,7 +46,7 @@ sub parse_patches_from_handle {
 		    if ($patch->complete()) {
 			push @patches, $patch;
 		    } else {
-			warning("patch: '".$patch->get_name()."' is invalid");
+			warning("patch '".$patch->get_name()."' is invalid");
 		    }
 		    $patch = undef;
 		    $reparse_line = 1;
@@ -66,7 +71,7 @@ sub parse_patches_from_handle {
 	if ($patch->complete()) {
 	    push @patches, $patch;
 	} else {
-	    warning("patch: '".$patch->get_name()."' is invalid");
+	    warning("patch '".$patch->get_name()."' is invalid");
 	}
     }
     return @patches;

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list