diff options
-rw-r--r-- | lib/rpmte.c | 8 | ||||
-rw-r--r-- | lib/rpmte_internal.h | 2 | ||||
-rw-r--r-- | lib/transaction.c | 5 | ||||
-rw-r--r-- | lib/verify.c | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c index 7a2bb4079..130c1d9a3 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -809,7 +809,7 @@ static Header rpmteFDHeader(rpmts ts, rpmte te) rpmtsSetVSFlags(ts, ovsflags); switch (pkgrc) { default: - rpmteClose(te, ts); + rpmteClose(te, ts, 1); break; case RPMRC_NOTTRUSTED: case RPMRC_NOKEY: @@ -851,7 +851,7 @@ exit: return (h != NULL); } -int rpmteClose(rpmte te, rpmts ts) +int rpmteClose(rpmte te, rpmts ts, int reset_fi) { if (te == NULL || ts == NULL) return 0; @@ -868,7 +868,9 @@ int rpmteClose(rpmte te, rpmts ts) break; } rpmteSetHeader(te, NULL); - rpmteSetFI(te, NULL); + if (reset_fi) { + rpmteSetFI(te, NULL); + } return 1; } diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h index 281f65f29..5706d56a6 100644 --- a/lib/rpmte_internal.h +++ b/lib/rpmte_internal.h @@ -67,7 +67,7 @@ RPM_GNUC_INTERNAL int rpmteOpen(rpmte te, rpmts ts, int reload_fi); RPM_GNUC_INTERNAL -int rpmteClose(rpmte te, rpmts ts); +int rpmteClose(rpmte te, rpmts ts, int reset_fi); RPM_GNUC_INTERNAL int rpmteMarkFailed(rpmte te, rpmts ts); diff --git a/lib/transaction.c b/lib/transaction.c index edc862b64..7259d021b 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -21,6 +21,7 @@ #include "lib/rpmte_internal.h" /* only internal apis */ #include "lib/rpmts_internal.h" #include "lib/cpio.h" +#include "rpmio/rpmhook.h" #include "debug.h" @@ -825,7 +826,7 @@ static int runTransScripts(rpmts ts, rpmTag stag) psm = rpmpsmNew(ts, p); xx = rpmpsmScriptStage(psm, stag, progtag); psm = rpmpsmFree(psm); - rpmteClose(p, ts); + rpmteClose(p, ts, 0); } } pi = rpmtsiFree(pi); @@ -878,7 +879,7 @@ static int rpmtsProcess(rpmts ts) failed = rpmpsmStage(psm, stage); (void) rpmswExit(rpmtsOp(ts, op), 0); psm = rpmpsmFree(psm); - rpmteClose(p, ts); + rpmteClose(p, ts, 1); } if (failed) { rpmteMarkFailed(p, ts); diff --git a/lib/verify.c b/lib/verify.c index 1fb0195d8..9603e4acf 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -287,7 +287,7 @@ static int rpmVerifyScript(QVA_t qva, rpmts ts, Header h, FD_t scriptFd) rpmtsSetScriptFd(ts, NULL); /* clean up our fake transaction bits */ - rpmteClose(te, ts); + rpmteClose(te, ts, 0); rpmtsEmpty(ts); return rc; |