[Pkg-shadow-devel] CVS sid: debian/patches do not unapply cleanly

Alexander Gattin arg@online.com.ua
Sun, 17 Apr 2005 22:06:19 +0300


--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Tags: patch

Hi!

On Sun, Apr 17, 2005 at 11:41:35AM +0200, Nicolas François wrote:
> Can you try commenting the PATCHLIST line in debian/rules.

You found a workaround! :)

> This may be a dpatch bug. PATCHLIST is reversed to create UNPATCHLIST in
> /usr/share/dpatch/dpatch.make, but dpatch also reverses this list before
> deapplying patches.

This _is_ a dpatch bug. Just looking in 2 places makes
this clear.
1st place -- man dpatch:
> deapply (unpatch) [options]
>       ...  By  default  the  specified
>       patches  will be deapplied in the reverse order they were speci‐
>       fied
2nd place -- /usr/share/dpatch/dpatch.make:
> ifdef PATCHLIST
> UNPATCHLIST	:= $(shell echo ${PATCHLIST} | tr ' ' '\n' | tac)
> DPATCH_ALL	:=
...
> unpatch:
> 	dpatch ${_WORKDIR} deapply${DPATCH_ALL} ${_STAMPDIR} ${UNPATCHLIST}

Here we see that patch list is fed to dpatch in reverse
order, though it's clearly stated in its manpage that
dpatch reverses the list itself.

-- 
WBR,
xrgtn

--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dpatch.make.diff"

--- dpatch.make.orig	2005-04-17 21:53:19.000000000 +0300
+++ dpatch.make	2005-04-17 21:53:54.000000000 +0300
@@ -7,7 +7,6 @@
 DPATCH_STAMPFN	?= patch-stamp
 
 ifdef PATCHLIST
-UNPATCHLIST	:= $(shell echo ${PATCHLIST} | tr ' ' '\n' | tac)
 DPATCH_ALL	:=
 else
 DPATCH_ALL	:= -all
@@ -31,7 +30,7 @@
 	mv -f $@T $@
 
 unpatch:
-	dpatch ${_WORKDIR} deapply${DPATCH_ALL} ${_STAMPDIR} ${UNPATCHLIST}
+	dpatch ${_WORKDIR} deapply${DPATCH_ALL} ${_STAMPDIR} ${PATCHLIST}
 	rm -rf ${DPATCH_STAMPFN} ${DPATCH_STAMPFN}T ${DPATCH_STAMPDIR}
 
 # arch-tag: 6bb4c625-9a85-41d9-ab37-23cb0a16fb39

--17pEHd4RhPHOinZp--