Package: dpkg-dev
Version: 1.18.24
Severity: normal

Dear Maintainer,

When building source tarballs in a directory other than "." for example a
tempdir, dpkg-source has non-intuitive behaviour for 1.0 tarballs:

dpkg-source -x automatically puts the orig tarball in the right place:

$ rm -rf gcc-6_* testdir && mkdir testdir
$ dpkg-source -x build/gcc-6/gcc-6_6.3.0-19.dsc testdir/xxx
dpkg-source: info: extracting gcc-6 in testdir/xxx
dpkg-source: info: unpacking gcc-6_6.3.0.orig.tar.gz
dpkg-source: info: applying gcc-6_6.3.0-19.diff.gz
$ ls -gG testdir/
total 79680
drwxr-xr-x 3     4096 Jun 21 14:00 xxx/
-rw-r--r-- 1 81587460 Jun 21 14:00 gcc-6_6.3.0.orig.tar.gz

But then dpkg-source -b does not use it!

$ dpkg-source -b testdir/xxx
[..]
dpkg-source: info: building gcc-6 in gcc-6_6.3.0-19.tar.gz
dpkg-source: info: building gcc-6 in gcc-6_6.3.0-19.dsc

(
 If this was a 3.0 format patch, it would fail here with e.g.:
 dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream 
tarball found at ../hello_2.10.orig.tar.{bz2,gz,lzma,xz}
)

It should be detecting the orig tarball that it itself placed in testdir/, but
it doesn't - it only looks in "." instead, but that is not where I'm building.

As a workaround, one can copy it manually:

$ cp testdir/gcc-6_6.3.0.orig.tar.gz .
$ dpkg-source -b testdir/xxx
[..]
dpkg-source: info: building gcc-6 using existing gcc-6_6.3.0.orig.tar.gz
dpkg-source: info: building gcc-6 in gcc-6_6.3.0-19.diff.gz
[..]
dpkg-source: info: building gcc-6 in gcc-6_6.3.0-19.dsc

(Same result with a 3.0 package.)

But this shouldn't be necessary, dpkg-source should be able to pick up the
tarball from the previous location.

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'buildd-unstable'), (300, 'unstable'), (100, 
'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg-dev depends on:
ii  binutils      2.28-5
ii  bzip2         1.0.6-8.1
ii  libdpkg-perl  1.18.24
ii  make          4.1-9.1
ii  patch         2.7.5-1+b2
ii  perl          5.24.1-3
ii  tar           1.29b-1.1
ii  xz-utils      5.2.2-1.2+b1

Versions of packages dpkg-dev recommends:
ii  build-essential          12.3
ii  fakeroot                 1.21-3.1
ii  gcc [c-compiler]         4:6.3.0-4
ii  gcc-6 [c-compiler]       6.3.0-18
ii  gnupg                    2.1.18-6
ii  gnupg2                   2.1.18-6
ii  gpgv                     2.1.18-6
ii  libalgorithm-merge-perl  0.08-3

Versions of packages dpkg-dev suggests:
ii  debian-keyring  2017.05.28

-- no debconf information

Reply via email to