diff -u b/lib/transaction.c b/lib/transaction.c --- b/lib/transaction.c +++ b/lib/transaction.c 2012-06-08 16:25:39.367544735 +0000 @@ -366,6 +366,21 @@ static int handleColorConflict(rpmts ts, return rConflicts; } +static int is_a_doc_conflict(const char *fn) +{ + const char *ignorelist[] = { + "/usr/share/man/", + "/usr/share/gtk-doc/html/", + "/usr/share/gnome/html/", + NULL + }; + const char **dnp; + for (dnp = ignorelist; *dnp != NULL; dnp++) + if (strstr(fn, *dnp) == fn) return 1; + + return 0; +} + /** * handleInstInstalledFiles. * @param ts transaction set @@ -419,9 +434,19 @@ static void handleInstInstalledFile(cons if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_REPLACEOLDFILES) rConflicts = 0; + char *fn; + if (rConflicts) + fn = rpmfiFNIndex(fi, fx); + /* HACK: always install latest (arch-independent) man + pages and gtk/gnome html doc files. */ + if (rConflicts && is_a_doc_conflict(fn)) { + rpmfsSetAction(fs, fx, FA_CREATE); + rConflicts = 0; + free(fn); + } + if (rConflicts) { char *altNEVR = headerGetAsString(otherHeader, RPMTAG_NEVRA); - char *fn = rpmfiFNIndex(fi, fx); rpmteAddProblem(p, RPMPROB_FILE_CONFLICT, altNEVR, fn, headerGetInstance(otherHeader)); free(fn); @@ -562,8 +587,18 @@ assert(otherFi != NULL); rConflicts = handleColorConflict(ts, fs, fi, i, otherFs, otherFi, otherFileNum); + char *fn; + if (rConflicts) + fn = rpmfiFNIndex(fi, i); + /* HACK: always install latest (arch-independent) man + pages and gtk/gnome html doc files. */ + if (rConflicts && is_a_doc_conflict(fn)) { + rpmfsSetAction(fs, i, FA_CREATE); + rConflicts = 0; + free(fn); + } + if (rConflicts && reportConflicts) { - char *fn = rpmfiFNIndex(fi, i); rpmteAddProblem(p, RPMPROB_NEW_FILE_CONFLICT, rpmteNEVRA(otherTe), fn, 0); free(fn);