Fix preun scriptlet failure not aborting rpm erase

Since commit f4a49c3d44 ( Unceremoniously
eliminate rpmpsmNext() ), when a preun scriptlet is failing, rpm continues to
be erased. Handling return code of runInstScript.
This commit is contained in:
Frederic Bonnard 2016-07-05 10:04:02 +02:00 committed by Florian Festi
parent 215f3e9466
commit 1ac507f15f
1 changed files with 3 additions and 1 deletions

View File

@ -757,8 +757,10 @@ static rpmRC rpmPackageErase(rpmts ts, rpmpsm psm)
if (rc) break;
}
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN))
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN)) {
rc = runInstScript(psm, RPMTAG_PREUN);
if (rc) break;
}
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERUN)) {
/* Run file triggers in this package other package(s) set off. */