From: Changqing Li <[email protected]>

* %_prefer_color is used by rpm to determine which color's ELF file
is preferred to be installed.

Here are file colors:
0 is unknown or other
1 is Elf32
2 is Elf64
4 is MIPS64 n32 (this color is added by oe-core's patch)

if default value set to 7, all colors are preferred color, always
be last-in-wins.

For this scenario, when we have 64bits python3 installed first,
then install 32bits python3 later, 64bits python3 will be overwrited,
and sys.path will point to /usr/lib, not /usr/lib64, this may cause
some python3 modules not work. so fixed by remove setting of default
value 7, and use default value 2 of rpm

* other distro like fedora also use the default %_prefer_color 2

Signed-off-by: Changqing Li <[email protected]>
---
 meta/lib/oe/package_manager.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index b066041..c055d2b 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -805,8 +805,6 @@ class RpmPM(PackageManager):
         open(platformconfdir + "macros", 'w').write("%_transaction_color 7\n")
         if self.d.getVar('RPM_PREFER_ELF_ARCH'):
             open(platformconfdir + "macros", 'a').write("%%_prefer_color %s" % 
(self.d.getVar('RPM_PREFER_ELF_ARCH')))
-        else:
-            open(platformconfdir + "macros", 'a').write("%_prefer_color 7")
 
         if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
             signer = get_signer(self.d, self.d.getVar('RPM_GPG_BACKEND'))
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138044): 
https://lists.openembedded.org/g/openembedded-core/message/138044
Mute This Topic: https://lists.openembedded.org/mt/74065306/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to