Hi,

With this patch, cdbs-edit-patch correctly handles patches which end
in '.diff'.

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?
=== modified file 'debian/changelog'
--- debian/changelog    2006-10-02 13:14:07 +0000
+++ debian/changelog    2006-10-26 16:32:13 +0000
@@ -1,3 +1,10 @@
+cdbs (0.4.46ubuntu7) UNRELEASED; urgency=low
+
+  * scripts/cdbs-edit-patch: Handle patches ending with .diff. 
+    Closes: LP#68165
+
+ -- Martin Pitt <[EMAIL PROTECTED]>  Thu, 26 Oct 2006 18:31:30 +0200
+
 cdbs (0.4.46ubuntu6) edgy; urgency=low
 
   * scripts/cdbs-edit-patch: Fix whitespace handling of DEB_TAR_SRCDIR.

=== modified file 'scripts/cdbs-edit-patch'
--- scripts/cdbs-edit-patch     2006-10-02 12:48:15 +0000
+++ scripts/cdbs-edit-patch     2006-10-26 16:31:07 +0000
@@ -30,7 +30,8 @@
 fi
 
 SRCDIR=$(pwd)
-PATCHNAME=${1%.patch}.patch
+PATCHNAME="$1"
+echo "$PATCHNAME" | grep -q '\.diff$' || PATCHNAME=${PATCHNAME%.patch}.patch
 PATCHNAME=${PATCHNAME#debian/patches/}
 
 TMP=$(mktemp -t -d cdbs-new-patch.XXXXXX)
@@ -54,7 +55,7 @@
 [ -e "debian/patches/$PATCHNAME" ] || touch "debian/patches/$PATCHNAME" 
 
 # remove all patches later than or equal to the one to edit
-for p in $(find debian/patches -type f -name "*.patch" | LC_COLLATE=C sort 
-r); do
+for p in $(find debian/patches -type f \( -name "*.patch"  -o -name "*.diff" 
\) | LC_COLLATE=C sort -r); do
     rm -f "$p"
     pname=$(basename "$p")
     [ "$pname" != "$PATCHNAME" ] || break

Attachment: signature.asc
Description: Digital signature

Reply via email to