[Rpm-maint] [rpm-software-management/rpm] ELF file conflict 'color' resolution for tri-lib systems (#193)

Mark Hatle notifications at github.com
Fri Apr 7 19:35:54 UTC 2017


I am attempting to use rpm with a tri-lib system, mips64.  (ELF 32, ELF64 and MIPS64 n32)

I have a small patch that adds MIPS64 n32 ABI support to RPM:  http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch

This introduces color value of '4', that indicates MIPS64 n32.

This works if the system is installing MIPS64 n32 vs MIPS64 (colors 4 vs 2) and I have the preferred color set to one or the other.  However, if I add the third library of '1', or MIPS(32) then it can't resolve a three way conflict properly.

I've identified that in the lib/transaction.c file, handleColorConflict function.  The issue is that the system needs a final 'else' clause to deal with the situation where neither is the preferred type.

I've been working on a patch to resolve this, but I can't figure out how to make it work properly:

                rConflicts = 0;
+           } else {
+               /*
+                * If neither is already skipped, we skip the old one, and
+                * install the new one (last in wins).
+                */
+               if (ofs && !XFA_SKIPPING(rpmfsGetAction(ofs, ofx)) &&
+                    fs && !XFA_SKIPPING(rpmfsGetAction(fs, fx))) {
+                   rpmfsSetAction(ofs, ofx, FA_SKIPCOLOR);
+                   rpmfsSetAction(fs, fx, FA_CREATE);
+               }
+               rConflicts = 0;
            }


When I have do an install with ELF32, ELF64 and MIPS64 n32 (specified in that order as the rpm transaction), setting the preferred color to '2' (ELF64), the system will still install the n32 version.  (If I change the order so MIPS64 n32 is not the last in the transaction order then it works fine.)

What I appear to be getting during processing is:

conflict -- MIPS64 n32 vs ELF32 -- resolved to ELF32 (via the else I added)
conflict -- ELF32 vs ELF64 -- resolved to ELF64 (via existing mechanism)
conflict -- ELF64 vs ELF32 -- resolved to ELF64 (via existing mechanism)
conflict -- ELF32 vs MIPS64 n32 -- resolves to MIPS64 n32 (via the else I added)

So the conflict appears resolved, and both ELF64 and MIPS64n32 are installed, with the n32 version being 'last', so that is the version on the disk.

Any help would be appreciated on this three way resolution.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/193
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170407/0cbbde42/attachment-0001.html>


More information about the Rpm-maint mailing list