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

* Re: [OE-core] [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color
  2020-04-30  4:10 [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color Changqing Li
@ 2020-05-03  8:21 ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2020-05-03  8:21 UTC (permalink / raw)
  To: openembedded-core

On Thu, 2020-04-30 at 12:10 +0800, Changqing Li wrote:
> 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(-)

This causes a failure on the autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/1867

Cheers,

Richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color
       [not found] <160A7D8AF7F6BE8C.17748@lists.openembedded.org>
@ 2020-05-06  2:39 ` Changqing Li
  2020-05-06  8:09   ` Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Changqing Li @ 2020-05-06  2:39 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

ping

On 4/30/20 12:10 PM, Changqing Li wrote:
> 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'))
>
> 

[-- Attachment #2: Type: text/html, Size: 2419 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color
  2020-05-06  2:39 ` Changqing Li
@ 2020-05-06  8:09   ` Alexander Kanavin
  2020-05-06  8:21     ` Changqing Li
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2020-05-06  8:09 UTC (permalink / raw)
  To: Changqing Li; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]

There was a response from RP:

This causes a failure on the autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/1867

Alex

On Wed, 6 May 2020 at 04:39, Changqing Li <changqing.li@windriver.com>
wrote:

> ping
> On 4/30/20 12:10 PM, Changqing Li wrote:
>
> From: Changqing Li <changqing.li@windriver.com> <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> <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'))
>
>
> 
>

[-- Attachment #2: Type: text/html, Size: 2865 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] lib/oe/package_manager: update default rpm config %_prefer_color
  2020-05-06  8:09   ` Alexander Kanavin
@ 2020-05-06  8:21     ` Changqing Li
  0 siblings, 0 replies; 5+ messages in thread
From: Changqing Li @ 2020-05-06  8:21 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2412 bytes --]

Hi, Alex

Thanks. I will check this failure.

Changqing

On 5/6/20 4:09 PM, Alexander Kanavin wrote:
> There was a response from RP:
>
> This causes a failure on the autobuilder:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/1867
>
> Alex
>
> On Wed, 6 May 2020 at 04:39, Changqing Li <changqing.li@windriver.com 
> <mailto:changqing.li@windriver.com>> wrote:
>
>     ping
>
>     On 4/30/20 12:10 PM, Changqing Li wrote:
>>     From: Changqing Li<changqing.li@windriver.com>  <mailto: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>  <mailto: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'))
>>
>     
>

[-- Attachment #2: Type: text/html, Size: 3685 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

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