--- rpm-5.4.9/lib/psm.c.scriptlet~ 2012-04-19 19:26:06.000000000 +0200 +++ rpm-5.4.9/lib/psm.c 2012-05-15 01:43:59.841922573 +0200 @@ -2195,6 +2195,10 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s rpmRC rc = psm->rc; int saveerrno; int xx; + int non_pre_scripts_dont_fail = 0; +#if defined(RPM_VENDOR_MANDRIVA) + non_pre_scripts_dont_fail = rpmExpandNumeric("%{?_legacy_compat_non_pre_scripts_dont_fail}"); +#endif /* XXX hackery to assert(!scareMem) in rpmfiNew. */ /*@-castexpose@*/ @@ -2416,11 +2420,11 @@ assert(he->p.argv != NULL); if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERUN)) { /* Run triggers in this package other package(s) set off. */ rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; /* Run triggers in other package(s) this package sets off. */ rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN)) @@ -2759,16 +2763,16 @@ assert(psm->te != NULL); if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOST)) { rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERIN)) { /* Run triggers in other package(s) this package sets off. */ rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; /* Run triggers in this package other package(s) set off. */ rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } /* @@ -2801,17 +2805,17 @@ assert(psm->te != NULL); if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) { rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) { /* Run triggers in other package(s) this package sets off. */ rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; /* Run triggers in this package other package(s) set off. */ rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY))