Package: libdpkg-perl Version: 1.16.10 Severity: normal Tags: patch Dear Maintainer,
While trying to build a new debian package, I'm using a quilt patch that removes a file from the upstream original files. debuild -us -uc -S fails with [...] dpkg-genchanges: including full source code in upload dpkg-source --after-build r-cran-gbm_2.1-1 Argument "r-cran-gbm_2.1-1/LICENSE" isn't numeric in chmod at /usr/share/perl5/Dpkg/Source/Quilt.pm line 296. dpkg-source: error: unable to change permission of `r-cran-gbm_2.1-1/LICENSE': No such file or directory dpkg-source: info: unapplying remove-extra-license-file.patch dpkg-buildpackage: error: dpkg-source --after-build r-cran-gbm_2.1-1 gave error exit status 2 debuild: fatal error at line 1357: dpkg-buildpackage -rfakeroot -d -us -uc -S failed This error is triggered because the chmod call at /usr/share/perl5/Dpkg/Source/Quilt.pm:296 has its arguments swapped. Attached to this bug report you will find a patch against the developpement version of libdpkg-perl at git://git.debian.org/git/dpkg/dpkg.git which fixes this problem. Kind Regards, Pablo Oliveira. >From 1e75fde829b9a5d56f9794768c958f5106980adb Mon Sep 17 00:00:00 2001 From: Pablo Oliveira <pa...@sifflez.org> Date: Wed, 29 May 2013 13:48:52 +0200 Subject: [PATCH] Quilt.pm: fix argument order of chmod call In function restore_quilt_backup_files, the arguments of the chmod call were swapped. This prevented restoring quilt patches which delete files. --- scripts/Dpkg/Source/Quilt.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm index fb42cb5..2739ecc 100644 --- a/scripts/Dpkg/Source/Quilt.pm +++ b/scripts/Dpkg/Source/Quilt.pm @@ -294,7 +294,7 @@ sub restore_quilt_backup_files { unless (link($_, $target)) { copy($_, $target) || syserr(_g('failed to copy %s to %s'), $_, $target); - chmod($target, (stat(_))[2]) || + chmod((stat(_))[2], $target) || syserr(_g("unable to change permission of `%s'"), $target); } } else { -- 1.7.10.4 -- System Information: Debian Release: 7.0 APT prefers stable APT policy: (900, 'stable'), (500, 'stable-updates') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/2 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 libdpkg-perl depends on: ii dpkg 1.16.10 ii libtimedate-perl 1.2000-1 ii perl 5.14.2-21 Versions of packages libdpkg-perl recommends: ii bzip2 1.0.6-4 ii libfile-fcntllock-perl 0.14-2 ii xz-utils 5.1.1alpha+20120614-2 Versions of packages libdpkg-perl suggests: ii binutils 2.22-8 ii debian-keyring 2013.04.21 ii gcc [c-compiler] 4:4.7.2-1 ii gcc-4.4 [c-compiler] 4.4.7-2 ii gcc-4.6 [c-compiler] 4.6.3-14 ii gcc-4.7 [c-compiler] 4.7.2-5 ii gnupg 1.4.12-7 ii gpgv 1.4.12-7 ii patch 2.6.1-3 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org