From af9801a162ef41ca85ca62a30b17f745d2ac855a Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 15 Jan 2009 10:28:13 +0200 Subject: Add extra parameter to rpmteClose() to control fi behavior - pre/posttrans scripts should leave te->fi alone, now it was getting nuked, oops.. --- lib/rpmte.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/rpmte.c') 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; } -- cgit v1.2.3