Differentiate between filtered and otherwise resolved conflicts

- No functional changes here, just spelling out the different
  cases explicitly.
This commit is contained in:
Panu Matilainen 2012-08-24 07:51:55 +03:00
parent 3ade5ac3ac
commit 12322bad67
1 changed files with 9 additions and 2 deletions

View File

@ -306,10 +306,13 @@ static void handleInstInstalledFile(const rpmts ts, rpmte p, rpmfi fi, int fx,
rpm_color_t prefcolor = rpmtsPrefColor(ts);
rpm_color_t FColor = rpmfiFColorIndex(fi, fx) & tscolor;
rpm_color_t oFColor = rpmfiFColorIndex(otherFi, ofx) & tscolor;
int rConflicts;
int rConflicts = 1;
char rState = RPMFILE_STATE_REPLACED;
rConflicts = !(beingRemoved || (rpmtsFilterFlags(ts) & RPMPROB_FILTER_REPLACEOLDFILES));
/* Conflicts on to-be-removed files aren't normally an issue */
if (beingRemoved)
rConflicts = 0;
/* Resolve file conflicts to prefer Elf64 (if not forced). */
if (tscolor != 0 && FColor != 0 && oFColor != 0 && FColor != oFColor) {
if (oFColor & prefcolor) {
@ -322,6 +325,10 @@ static void handleInstInstalledFile(const rpmts ts, rpmte p, rpmfi fi, int fx,
}
}
/* Somebody used The Force, lets shut up... */
if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_REPLACEOLDFILES)
rConflicts = 0;
if (rConflicts) {
char *altNEVR = headerGetAsString(otherHeader, RPMTAG_NEVRA);
char *fn = rpmfiFNIndex(fi, fx);