Package: devscripts Version: 2.14.6 Severity: normal Tags: patch Some upstream build the tarball by adding dir and files to it, sometimes introduces duplicated dir entries.
For example: mkdir -p test/dir1 tar cfz test-1.0.tar.gz test/dir1 test/dir1 mkdir -p test/debian echo 'Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/' > test/debian/copyright echo 'Files-Excluded: dir1' >> test/debian/copyright mk-origtargz --package test --version 1.0 --copyright-file test/debian/copyright test-1.0.tar.gz Expected output: Successfully repacked test-1.0.tar.gz as test_1.0.orig.tar.gz, deleting 1 files from it. Actual: tar: test/dir1: Not found in archive tar: Exiting with failure status due to previous errors mk-origtargz: error: tar --delete --file ./test_1.0.orig.tar test/dir1/ test/dir1/ gave error exit status 2 -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- DEBSIGN_KEYID=CEC6AD46 -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.2 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages devscripts depends on: ii dpkg-dev 1.17.13 ii libc6 2.19-11 ii perl 5.20.0-6 ii python3 3.4.1-1 pn python3:any <none> Versions of packages devscripts recommends: ii at 3.1.15-1 ii curl 7.38.0-1 ii dctrl-tools 2.23 ii debian-keyring 2014.08.31 ii dput-ng [dput] 1.8 ii equivs 2.0.9 ii fakeroot 1.20.1-1.1 ii file 1:5.19-2 ii gnupg 1.4.18-4 ii libdistro-info-perl 0.13 ii libencode-locale-perl 1.03-1 ii libjson-perl 2.61-1 ii liblwp-protocol-https-perl 6.06-2 ii libparse-debcontrol-perl 2.005-4 ii libsoap-lite-perl 1.11-1 ii liburi-perl 1.64-1 ii libwww-perl 6.08-1 ii lintian 2.5.27 ii man-db 2.6.7.1-1 ii patch 2.7.1-6 ii patchutils 0.3.3-1 ii python3-debian 0.1.23 pn python3-magic <none> ii sensible-utils 0.0.9 ii strace 4.9-2 ii unzip 6.0-12 ii wdiff 1.2.2-1 ii wget 1.15-1+b1 ii xz-utils 5.1.1alpha+20120614-2 Versions of packages devscripts suggests: ii build-essential 11.7 pn cvs-buildpackage <none> pn devscripts-el <none> ii gnuplot 4.6.5-10 ii gpgv 1.4.18-4 ii heirloom-mailx [mailx] 12.5-3 pn libauthen-sasl-perl <none> pn libfile-desktopentry-perl <none> ii libnet-smtp-ssl-perl 1.01-3 pn libterm-size-perl <none> ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl 1.27-2+b2 pn mutt <none> ii openssh-client [ssh-client] 1:6.6p1-7 pn svn-buildpackage <none> ii w3m 0.5.3-17 -- no debconf information
--- /usr/bin//mk-origtargz 2014-09-20 18:13:48.064356878 +0800 +++ /tmp/mk-origtargz 2014-09-20 18:13:21.171380905 +0800 @@ -164,6 +164,7 @@ use Cwd 'abs_path'; use File::Copy; use Dpkg::Control::Hash; +use List::MoreUtils qw(uniq); sub decompress_archive($$); @@ -428,6 +429,7 @@ # ensure files are mentioned before the directory they live in # (otherwise tar complains) @to_delete = sort {$b cmp $a} @to_delete; + @to_delete = uniq @to_delete; $deletecount = scalar(@to_delete); }