Subject: Re: patching order
To: iMil <>
From: Johnny Lam <>
List: tech-pkg
Date: 04/08/2005 10:46:23
iMil wrote:
> i'm modifying openssh's package to integrate OpenSSH LDAP Public Key 
> (openssh-lpk patch) feature. Nothing's wrong with usage, 
> except that patches/patch-at conflicts with openssh-lpk.patch, defined by:
> PATCHFILES=             openssh-lpk-3.9p1-0.3.2.patch
> However, openssh-lpk patch does not conflict with patches when applied 
> after them.
> My question is, is there any way to affect patching order, say, 
> patches/* before PATCHFILES ?

No, there isn't any way to specify patching order.  There's no good 
general way to do this since patches can conflict, especially if they 
are 3rd-party patches that aren't integrated into the mainline distribution.

What I would do is rename patch-at to "no-privsep-patch" and create a 
no-privsep-lpk-patch that contains the same changes but after the 
openssh-lpk patch is applied.  Then you would create a post-patch target 
that looks something like:

.if !empty(PKG_OPTIONS:Mlpk)
	${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/no-privsep-lpk-patch
	${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/no-privsep-patch

It's kludgy, but the best we can do for now.


	-- Johnny Lam <>