Hi! On Thu, 2015-08-27 at 13:18:12 +0200, Jakub Wilk wrote: > Control: found -1 1.18.2 > > * Guillem Jover <guil...@debian.org>, 2014-08-09, 20:45: > > > This is what happens when you add a debian/* file to a quilt patch > > > (which is apparently something newcomers sometimes do...) and then > > > try to build the source package: > > > > > > patching file debian/rules > > > Reversed (or previously applied) patch detected! Skipping patch. > > > 1 out of 1 hunk ignored > > > dpkg-source: info: fuzz is not allowed when applying patches > > > dpkg-source: info: if patch 'moo.diff' is correctly applied by > > > quilt, use 'quilt refresh' to update it > > > > > > Here the patch is correctly applied by quilt (in the sense that you > > > can push and pop it), but no amount of refreshing will fix the > > > problem. > > > > > > Could dpkg-source say explicitly that quilt-patching debian/* files > > > is not supported, and suggest using "quilt remove"? > > > > Sure, makes sense. I'm fixing this for 1.17.12, as I'm wrapping up the > > 1.17.11 release right now. > > Any news on this? 1.17.12 was released over a year ago, but I can still > reproduce this bug.
I think at the time it seemed quick to fix, but when I actually looked, it wasn't. In the mean time, through another (related) report, I improved the error message which now reads as follows: ,--- […] dpkg-source: info: applying debian-changes.patch patching file debian/rules Reversed (or previously applied) patch detected! Skipping patch. 2 out of 2 hunks ignored dpkg-source: info: the patch has fuzz which is not allowed, or is malformed dpkg-source: info: if patch 'debian-changes.patch' is correctly applied by quilt, use 'quilt refresh' to update it dpkg-source: info: if the file is present in the unpacked source, make sure it is also present in the orig tarball dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/debian-changes.patch/ --reject-file=- < source-1.0.orig._XkvRm/debian/patches/debian-changes.patch subprocess returned exit status 1 dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 2 `--- Where it is now hinted that patching a file that is not present in the orig tarball will fail. I think this is an improvement, that covers this case too, although perhaps it's not entirely obvious to a newcomer. Ideally, the patch would get parsed, and any hunk modifying or deleting (instead of adding) a file that is not present in the orig tarball would be detected and handled on its own, but I'm afraid that will need more work here. Thanks, Guillem