From: Panu Matilainen Date: Sun, 8 Mar 2009 15:36:39 +0000 (+0200) Subject: Dont bother retrieving colors unless actually needed X-Git-Tag: rpm-4.7.0-rc1~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a6b291daa48fccb14ad450c060d73e68ef3352b;hp=b2952256eff9497cf5c4630e934757dc4ce62408;p=platform%2Fupstream%2Frpm.git Dont bother retrieving colors unless actually needed --- diff --git a/lib/transaction.c b/lib/transaction.c index b28c426..798a2a4 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -72,26 +72,20 @@ static int handleInstInstalledFile(const rpmts ts, rpmte p, rpmfi fi, Header otherHeader, rpmfi otherFi, int beingRemoved) { - rpm_color_t tscolor = rpmtsColor(ts); - rpm_color_t prefcolor = rpmtsPrefColor(ts); - rpm_color_t oFColor, FColor; unsigned int fx = rpmfiFX(fi); rpmfs fs = rpmteGetFileStates(p); - int isCfgFile; - oFColor = rpmfiFColor(otherFi); - oFColor &= tscolor; - - FColor = rpmfiFColor(fi); - FColor &= tscolor; - isCfgFile = ((rpmfiFFlags(otherFi) | rpmfiFFlags(fi)) & RPMFILE_CONFIG); if (XFA_SKIPPING(rpmfsGetAction(fs, fx))) return 0; if (rpmfiCompare(otherFi, fi)) { + rpm_color_t tscolor = rpmtsColor(ts); + rpm_color_t prefcolor = rpmtsPrefColor(ts); + rpm_color_t FColor = rpmfiFColor(fi) & tscolor; + rpm_color_t oFColor = rpmfiFColor(otherFi) & tscolor; int rConflicts; rConflicts = !(beingRemoved || (rpmtsFilterFlags(ts) & RPMPROB_FILTER_REPLACEOLDFILES));