Upstream source

Henrique de Moraes Holschuh hmh at debian.org
Tue Oct 3 13:50:01 UTC 2006


On Tue, 03 Oct 2006, Farzad FARID wrote:
>  - I think there is a bad interaction between "clean" and "patch",
> "patch" can only be run after "clean", otherwise the patch #99 won't
> apply. Therefore it's not reversible.
>  - Furthermore, "configure-stamp" (which is executed after "patch")
> deletes 2 files modified by "patch", config.sub and config.guess. This
> is not reversible either.

The only sane way to handle clean and dpatches is to enforce this:

1.  clean THEN PATCH
2.  unpatch THEN clean

So your clean target should depend on unpatch.  All targets that depend on
clean must depend on it first, and on patch later.

This *does* mean you cannot use patches to fix cleaning problems.  You
either patch the build stuff directly instead of using dpatch (but keep
using dpatch for non-build fixes, e.g. code fixes, doc fixes...), or you do
all the fix for the cleanup in the debian/rules clean target.

The alternate way is to have a build tree where you unpack and patch the
code, and clean is a rm -rf of that tree.  You are not really building it
twice, in that case.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list