Package: dpatch
Version: 2.0.27
Severity: normal
Tags: patch

Sometimes upstream tarballs have strange names.  uscan/watch provides a way
to normalize them.  uscan will download the new version and set a symlink from
the canonical name to the upstream name.  e.g.

gambc_4.0.1.orig.tar.gz
 -> gambc-v4_0_1.tgz

When d-g-o copies the tarball to the directory, it traverses the symlink and
copies the file using the upstream name.  I believe it should use the canonical
name; otherwise the subsequent tests in d-g-o can't find the tarball, d-g-o
errors out, and dpatch-edit-patch consequently fails.

Also, there is a minor error:  if d-g-o is called with no arg, the usage
message is never printed because the 'switch' command errors out and d-g-o
exits first.

--- /usr/bin/dpatch-get-origtargz.orig  2007-09-18 16:14:14.000000000 -0400
+++ /usr/bin/dpatch-get-origtargz       2007-09-18 23:59:38.000000000 -0400
@@ -11,7 +11,7 @@
 # Usage: dpatch-get-origtargz origtardir
 
 ORIGTARDIR="$1"
-shift
+shift || true
 if [ -z "$ORIGTARDIR" ] || [ -n "$1" ]; then
   echo >&2 "${DPGO_BASENAME}: Usage: dpatch-get-origtargz <origtardir>"
   exit 1
@@ -33,12 +33,12 @@
        fi
     done
 fi
- 
+
 # path and other methods failed, try heuristics and apt
 
 if [ ! -f  "${ORIGTARDIR}/$ORIGTARGZ" ]; then
     if [ -f "../$ORIGTARGZ" ]; then
-       cp $(readlink -f "../$ORIGTARGZ") $ORIGTARDIR
+       cp $(readlink -f "../$ORIGTARGZ") $ORIGTARDIR/$ORIGTARGZ
     elif [ -x $(which apt-get) ]; then
        if (cd $ORIGTARDIR && apt-get --tar-only source "$PACKAGENAME"); then
            if ! [ -f "${ORIGTARDIR}/$ORIGTARGZ" ]; then


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (900, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-3-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

dpatch depends on no packages.

Versions of packages dpatch recommends:
ii  dpkg-dev                      1.14.6     package building tools for Debian
ii  fakeroot                      1.7.1      Gives a fake root environment
ii  patchutils                    0.2.31-4   Utilities to work with patches

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to