--- rpm-5.4.9/lib/transaction.c.doc_conflicts~ 2012-04-26 20:36:19.000000000 +0200 +++ rpm-5.4.9/lib/transaction.c 2012-05-15 01:46:37.964693880 +0200 @@ -68,6 +68,24 @@ /*@access IDTX @*/ /*@access FD_t @*/ +#if defined(RPM_VENDOR_MANDRIVA) +static int is_a_doc_conflict(rpmfi fi) +{ + const char *ignorelist[] = { + "/usr/share/man/", + "/usr/share/gtk-doc/html/", + "/usr/share/gnome/html/", + NULL + }; + const char *fn = rpmfiFN(fi); + const char **dnp; + for (dnp = ignorelist; *dnp != NULL; dnp++) + if (strstr(fn, *dnp) == fn) return 1; + + return 0; +} +#endif + #ifdef __cplusplus #define FF_ISSET(_fflags, _FLAG) ((_fflags) & (RPMFILE_##_FLAG)) @@ -164,6 +182,17 @@ static int handleInstInstalledFile(const } } +#if defined(RPM_VENDOR_MANDRIVA) + if(rpmExpandNumeric("%{?_legacy_compat_no_doc_conflicts}")) { + /* HACK: always install latest (arch-independent) man + pages and gtk/gnome html doc files. */ + if (rConflicts && is_a_doc_conflict(fi)) { + fi->actions[fx] = FA_CREATE; + rConflicts = 0; + } + } +#endif + if (rConflicts) { HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he)); rpmps ps = rpmtsProblems(ts); @@ -429,6 +458,17 @@ assert(otherFi != NULL); done = 1; } +#if defined(RPM_VENDOR_MANDRIVA) + if(rpmExpandNumeric("%{?_legacy_compat_no_doc_conflicts}")) { + /* HACK: always install latest (arch-independent) man + pages and gtk/gnome html doc files. */ + if (rConflicts && is_a_doc_conflict(fi)) { + fi->actions[i] = FA_CREATE; + rConflicts = 0; + } + } +#endif + if (rConflicts) { rpmpsAppend(ps, RPMPROB_NEW_FILE_CONFLICT, rpmteNEVR(p), rpmteKey(p),