rpm: fix failure to report file conflicts
PATCH v2 1/1 rpm: fix failure to report file conflicts
Signed-off-by Martin Vuille <[email protected]>
--- .../rpm-fix-failure-to-report-file-conflicts.patch | 44 ++++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.16.bb | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-fix-failure-to-report-file-conflicts.patch
meta/recipes-devtools/rpm/rpm/rpm-fix-failure-to-report-file-conflicts.patch new file +44 -0
@@ -0,0 +1,44 @@ +Problem: Conflicts between two packages trying to install different versions + of the same file are not detected. Both copies of the file are + installed and the build is not deterministic because a different + outcome results depending on which package is installed last. + +Cause: All conflicts are treated as color conflicts, even when the files + are not ELF files. And one of the ways that these conflicts are + handled is to install both conflicting files and letting the one + installed last win. + +Fix: Backport from upstream (see function handleColorConflict in + lib/transaction.c). Only treat as a color conflict when both of the + conflicting files have a color and they do not both have the same + color. Do not handle color conflicts by installing both conflicting + files. + +Upstream-Status: Backport + +Signed-off-by: Martin Vuille <[email protected]> + +--- a/lib/transaction.c ++++ b/lib/transaction.c +@@ -411,7 +411,7 @@ assert(otherFi != NULL); + + rConflicts = reportConflicts; + /* Resolve file conflicts to prefer Elf64 (if not forced) ... */ +- if (tscolor != 0) { ++ if (tscolor != 0 && FColor != 0 && oFColor != 0 && FColor != oFColor) { + if (FColor & prefcolor) { + /* ... last file of preferred colour is installed ... */ + if (!iosmFileActionSkipped((iosmFileAction) fi->actions[i])) { +@@ -431,12 +431,6 @@ assert(otherFi != NULL); + otherFi->actions[otherFileNum] = FA_CREATE; + fi->actions[i] = FA_SKIPCOLOR; + rConflicts = 0; +- } else +- { +- /* ... otherwise, do both, last in wins. */ +- otherFi->actions[otherFileNum] = FA_CREATE; +- fi->actions[i] = FA_CREATE; +- rConflicts = 0; + } + done = 1; + }
meta/recipes-devtools/rpm/rpm_5.4.16.bb +1 -0
@@ -120,6 +120,7 @@ SRC_URI += " \ file://0001-system.h-query.c-support-nosignature.patch \ file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \ file://0001-macros-add-_gpg_sign_cmd_extra_args.patch \ + file://rpm-fix-failure-to-report-file-conflicts.patch \ " # OE specific changes
Signature · 1 line
2.13.6