From e4124b08060bc418ef5c332653aa9587d52c80fc Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 19 Apr 2011 10:09:22 +0300 Subject: [PATCH] Restore previous vsflags on return from rpmInstall() and rpmErase() - Nobody is going to care really but since we bother remembering them we might as well restore them too, silencing another two set-but-unused warnings (this time semi-meaningful even) --- lib/rpminstall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/rpminstall.c b/lib/rpminstall.c index ef34a74..7569bbf 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -377,6 +377,9 @@ int rpmInstall(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_t fileArgv) int rc; int i; + vsflags = setvsFlags(ia); + ovsflags = rpmtsSetVSFlags(ts, (vsflags | RPMVSF_NEEDPAYLOAD)); + if (fileArgv == NULL) goto exit; rpmcliPackagesTotal = 0; @@ -385,9 +388,6 @@ int rpmInstall(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_t fileArgv) relocations = ia->relocations; - vsflags = setvsFlags(ia); - ovsflags = rpmtsSetVSFlags(ts, (vsflags | RPMVSF_NEEDPAYLOAD)); - setNotifyFlag(ia, ts); if ((eiu->relocations = relocations) != NULL) { @@ -606,6 +606,7 @@ exit: free(eiu); rpmtsEmpty(ts); + rpmtsSetVSFlags(ts, ovsflags); return rc; } @@ -676,6 +677,7 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv) numFailed = rpmcliTransaction(ts, ia, numPackages); exit: rpmtsEmpty(ts); + rpmtsSetVSFlags(ts, ovsflags); return numFailed; } -- 2.7.4