Package: devscripts
Version: 2.9.11
Severity: normal
Tags: patch

Hi,

I discovered this problem during the last BSP, but I forgot to send it
in in time, so I'll send it now :-) nmudiff doesn't strip epochs
properly from the file names; the included patch makes it do so.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14.3
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)

Versions of packages devscripts depends on:
ii  debianutils                   2.15.2     Miscellaneous utilities specific t
ii  dpkg-dev                      1.13.11.1  package building tools for Debian
ii  libc6                         2.3.5-12   GNU C Library: Shared libraries an
ii  perl                          5.8.7-10   Larry Wall's Practical Extraction 
ii  sed                           4.1.4-5    The GNU sed stream editor

Versions of packages devscripts recommends:
ii  fakeroot                      1.5.6      Gives a fake root environment

-- no debconf information
--- nmudiff     2006-01-20 00:18:25.000000000 +0100
+++ /usr/local/sbin/nmudiff     2006-02-07 15:29:07.000000000 +0100
@@ -1,15 +1,16 @@
 #! /bin/sh
-# Copyright 2006 by Steinar H. Gunderson
-# Licensed under the GPL version 2.
 
 set -e
 
 SOURCE=$( dpkg-parsechangelog | grep ^Source: | cut -d" " -f2 )
 VERSION=$( dpkg-parsechangelog | grep ^Version: | cut -d" " -f2 )
-OLDVERSION=$(grep '^[-a-z0-9+]' debian/changelog |head -2|tail -1 | sed 
's/.*(\(.*\)).*/\1/')
+OLDVERSION=$( dpkg-parsechangelog -v~ | sed -n "s/^ [^ .][^ ]* 
(\(.*\)).*$/\1/p" | head -2 | tail -1 )
 
-debdiff ../${SOURCE}_$OLDVERSION.dsc ../${SOURCE}_$VERSION.dsc > 
../${SOURCE}-$VERSION-nmu.diff
-sensible-editor ../${SOURCE}-$VERSION-nmu.diff
+VERSION_NO_EPOCH=$( echo "$VERSION" | sed "s/^[0-9]\+://" )
+OLDVERSION_NO_EPOCH=$( echo "$OLDVERSION" | sed "s/^[0-9]\+://" )
+
+debdiff ../${SOURCE}_${OLDVERSION_NO_EPOCH}.dsc 
../${SOURCE}_${VERSION_NO_EPOCH}.dsc > ../${SOURCE}-${VERSION_NO_EPOCH}-nmu.diff
+sensible-editor ../${SOURCE}-${VERSION_NO_EPOCH}-nmu.diff
 
 TMPNAM=$( tempfile )
 cat <<EOF >$TMPNAM
@@ -23,5 +24,5 @@
 Attached is the diff for my $SOURCE $VERSION NMU.
 EOF
 
-mutt -s "diff for $VERSION NMU" -i $TMPNAM -a ../${SOURCE}-$VERSION-nmu.diff 
[EMAIL PROTECTED]
+mutt -s "diff for $VERSION NMU" -i $TMPNAM -a 
../${SOURCE}-${VERSION_NO_EPOCH}-nmu.diff [EMAIL PROTECTED]
 rm $TMPNAM

Reply via email to