Excerpts from Raphael Hertzog's message of Thu Dec 22 16:16:30 +0100 2011:
> On Thu, 22 Dec 2011, Michal Suchanek wrote:
> > patching file qemu-options.hx
> > Hunk #1 succeeded at 2451 (offset 85 lines).
> > dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -g0 -E -b -B 
> > .pc/nops2.patch/ < qemu-kvm-0.15.1+dfsg/debian/patches/nops2.patch gave 
> > error exit
> >  status 1
> > dpkg-buildpackage: error: dpkg-source --before-build qemu-kvm-0.15.1+dfsg 
> > gave error exit status 1
> 
> So apparently at this point, despite the failure, patch modified several
> files and will not undo those changes. The correct thing to do would then
> be to restore the files from .pc/nops2.patch/ so that we're back to the
> initial state before we tried to apply this patch (and then clean up that
> directory too).
> 
> FWIW that's what quilt is doing (with the help of its backup-files
> script).

And that's the right thing to do. Since I have the unmodified source
package at hand I can easily reapply and refresh the patch but generally
corrupting the sources is the job of the user, not debhelper.

> 
> Another approach could be to --dry-run the patch first but that would be
> too expensive and would impact everybody.
> 
> Yet another idea would be to re-apply the patch with the -R option. It
> would drop the changes already applied (and fail again due to the changes
> that failed to apply). This is probably easier to implement than the
> restore from .pc/nops2.patch/ but not very clean.

Since some patches like to apply in one way and not the other this might
lead to some even more obscure bugs so I don't think this is a good
idea.

Thanks

Michal



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

Reply via email to