[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: postun script failure OK ?



On Mon, Mar 03, 2003 at 04:01:41PM -0500, Tristan Van Berkom wrote:
> 	I'm wondering if there is a good reason 
> to not fail package erasure when postun scriptlets
> fail:
> 
> rpm 4.1-9
> $(topsrcdir)/lib/psm.c
> 
> in function psmStage();
> 
> switch () {
>     case PSM_POST:
> 	if (psm->goal == PSM_PKGERASE) {
> 	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) {
> 		rc = rpmpsmStage(psm, PSM_SCRIPT);
> 		/* XXX WTFO? postun failures don't cause erasure failure. */
> 	    }
> 	}
>     break;
> }
> 
> Actually that commentary is intact (I'm not the only one
> that is wondering the same thing). Anyone have a _FINAL_
> word on this ?
> 
> 
> Cheers,
> 		-Tristan
> 
> 
> Off the top of my head:
> 	PostUn scripts are run after the actual filesystem
> manipulation and before database erasure synchronisation; so
> `return'ing at this point results in multiple versions of the
> same package (which would no longer exist in reality).
> 
> 	It is sane to continue with the package db erasure etc.
> but might be a good idea for this at least to cause 
> `psmStage(psm, PSM_PKGERASE)' to return an error.
> 
> hmmmm; note also that ATM; if triggers in other packages triggered
> by the erasure of "this" package fail; this will also result
> in multiple versions of "this" package present in the DB.
> 

Many packages don't necessarily have valid and working %postun scripts,
basically because almost nobody tests package erasure. Many, many
legacy packages depend on this behavior.

(sorry, been backporting rpm-4.2 to rpm-4.1.1 for several days)

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []