public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color
@ 2020-04-30  4:10 Changqing Li
  2020-05-03  8:21 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Changqing Li @ 2020-04-30  4:10 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

* %_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
3 is (contains) both

if default value set to 7, both 32 and 64 bits's ELF will be installed,
in this condition, when we have 64bits python3 installed first,
then install lib32-python3 later, 64bits python3 will be overwrited,

file /usr/bin/python3 will be 32bits ELF
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 <changqing.li@windriver.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread
[parent not found: <160A7D8AF7F6BE8C.17748@lists.openembedded.org>]

end of thread, other threads:[~2020-05-06  8:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30  4:10 [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color Changqing Li
2020-05-03  8:21 ` [OE-core] " Richard Purdie
     [not found] <160A7D8AF7F6BE8C.17748@lists.openembedded.org>
2020-05-06  2:39 ` Changqing Li
2020-05-06  8:09   ` Alexander Kanavin
2020-05-06  8:21     ` Changqing Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox