Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#757607: dpkg-dev: unhelpful error message when quilt-patching debian/*

358 views
Skip to first unread message

Jakub Wilk

unread,
Aug 9, 2014, 2:50:02 PM8/9/14
to
Package: dpkg-dev
Version: 1.17.10
Severity: minor

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"?


-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.14-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg-dev depends on:
ii base-files 7.5
ii binutils 2.24.51.20140807-1
ii bzip2 1.0.6-7
ii libdpkg-perl 1.17.10
ii make 4.0-8
ii patch 2.7.1-5
ii xz-utils 5.1.1alpha+20120614-2

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Guillem Jover

unread,
Aug 9, 2014, 2:50:02 PM8/9/14
to
Hi!

On Sat, 2014-08-09 at 20:39:54 +0200, Jakub Wilk wrote:
> Package: dpkg-dev
> Version: 1.17.10
> Severity: minor
>
> 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.

Thanks,
Guillem

Jakub Wilk

unread,
Aug 27, 2015, 7:30:02 AM8/27/15
to
Control: found -1 1.18.2

* Guillem Jover <gui...@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.

--
Jakub Wilk

Guillem Jover

unread,
Mar 14, 2022, 10:50:03 PM3/14/22
to
Hi!
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
0 new messages