rpm/rpm-5.3.8-non-pre-scripts-dont-fail.patch
2012-02-01 14:15:49 +04:00

68 lines
2.3 KiB
Diff

--- rpm-5.3.8/lib/psm.c.scriptlet~ 2011-01-09 07:18:14.000000000 +0100
+++ rpm-5.3.8/lib/psm.c 2011-01-19 01:04:33.070131004 +0100
@@ -2178,6 +2178,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@*/
@@ -2399,11 +2403,11 @@ assert(he->p.argv != NULL);
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERUN)) {
/* Run triggers in this package other package(s) set off. */
rc = 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 = rpmpsmNext(psm, PSM_TRIGGERS);
- if (rc) break;
+ if(rc && !non_pre_scripts_dont_fail) break;
}
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN))
@@ -2743,16 +2747,16 @@ assert(psm->te != NULL);
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOST)) {
rc = 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 = 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 = rpmpsmNext(psm, PSM_IMMED_TRIGGERS);
- if (rc) break;
+ if(rc && !non_pre_scripts_dont_fail) break;
}
/*
@@ -2785,17 +2789,17 @@ assert(psm->te != NULL);
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) {
rc = 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 = 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 = rpmpsmNext(psm, PSM_IMMED_TRIGGERS);
- if (rc) break;
+ if(rc && !non_pre_scripts_dont_fail) break;
}
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY))