From c5e957a3b30abcdc368082be3a99e3f8c95a238f Mon Sep 17 00:00:00 2001 From: Alexey Tourbin Date: Wed, 4 Jun 2008 03:20:20 +0400 Subject: [PATCH] lib/transaction.c (handleInstInstalledFiles): fixed RPMFILE_CONFIG bug --- lib/transaction.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/transaction.c b/lib/transaction.c index e596792..2073882 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -942,6 +942,7 @@ static int handleInstInstalledFiles(const TFI_t fi, /*@null@*/ rpmdb db, for (i = 0; i < sharedCount; i++, shared++) { int otherFileNum, fileNum; + int isCfgFile; otherFileNum = shared->otherFileNum; fileNum = shared->pkgFileNum; @@ -952,12 +953,13 @@ static int handleInstInstalledFiles(const TFI_t fi, /*@null@*/ rpmdb db, if (XFA_SKIPPING(fi->actions[fileNum])) continue; + isCfgFile = (otherFi->fflags[otherFileNum] | fi->fflags[fileNum]) & RPMFILE_CONFIG; + if (filecmp(otherFi, otherFileNum, fi, fileNum)) { if (reportConflicts) psAppend(probs, RPMPROB_FILE_CONFLICT, fi->ap, fi->dnl[fi->dil[fileNum]], fi->bnl[fileNum], h, 0); - if (!(otherFi->fflags[otherFileNum] | fi->fflags[fileNum]) - & RPMFILE_CONFIG) { + if (!isCfgFile) { /*@-assignexpose@*/ if (!shared->isRemoved) fi->replaced[numReplaced++] = *shared; @@ -965,7 +967,7 @@ static int handleInstInstalledFiles(const TFI_t fi, /*@null@*/ rpmdb db, } } - if ((otherFi->fflags[otherFileNum] | fi->fflags[fileNum]) & RPMFILE_CONFIG) { + if (isCfgFile) { fi->actions[fileNum] = decideFileFate( fi->dnl[fi->dil[fileNum]], fi->bnl[fileNum],