diff options
author | Frederic Bonnard <frediz@linux.vnet.ibm.com> | 2016-07-05 10:04:02 +0200 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2016-07-29 17:36:41 +0200 |
commit | 1ac507f15f014e69b926a1c2bf9a46a2a4dcaff3 (patch) | |
tree | d892fc32471ace3340ec93860ab12d767c57eb0b | |
parent | 215f3e9466650819b0f5ebdb01512629bfd4fce1 (diff) | |
download | rpm-1ac507f15f014e69b926a1c2bf9a46a2a4dcaff3.tar.gz |
Fix preun scriptlet failure not aborting rpm erase
Since commit f4a49c3d446bb180ca6b30a4337065fb6511e641 ( Unceremoniously
eliminate rpmpsmNext() ), when a preun scriptlet is failing, rpm continues to
be erased. Handling return code of runInstScript.
-rw-r--r-- | lib/psm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. */ |