On Sun, May 11, 2008 at 07:07:34PM +0100, Adam D. Barratt wrote:
> On Sun, 2008-05-11 at 19:29 +0200, Robert Millan wrote:
> > This patch looks wrong.  It doesn't take into account that if you run
> > debcommit from inside the debian/ dir, dpkg-parsechangelog will fail,
> > and the version of the package won't be obtained properly.
> 
> Indeed (assuming you're referring to the patch in
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450878#14).

Well, that much would be easy to fix. See attached patch (which at least
lets you do 'debcommit -c changelog -r' in debian/ and have it work
properly).

Cheers,

-- 
Colin Watson                                       [[email protected]]
Index: scripts/debcommit.pl
===================================================================
--- scripts/debcommit.pl	(revision 1862)
+++ scripts/debcommit.pl	(working copy)
@@ -341,7 +341,7 @@
     }
     close C;
     
-    $version=`dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' '`;
+    $version=`dpkg-parsechangelog -l\Q$changelog\E | grep '^Version:' | cut -f 2 -d ' '`;
     chomp $version;
 
     $message="releasing version $version" if ! defined $message;

Reply via email to