base.bbclass: fix RRECOMMENDS extend issue for multilib
PATCH 1/1 base.bbclass: fix RRECOMMENDS extend issue for multilib
From: Changqing Li <[email protected]>
After following commit in meta-oe,
[fe3ba7ac5c cryptsetup: demote udev runtime dependency to recommendation]
bitbake lib32-cryptsetup will failed with error:
ERROR: QA Issue: lib32-cryptsetup package lib32-cryptsetup - suspicious values 'udev lvm2' in RRECOMMENDS [multilib]
This is because RRECOMMENDS is not extended with mlprefix, with this fix, RRECOMMENDS:lib32-cryptsetup is corrected.
Without this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts udev lvm2" Whith this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts lib32-udev lib32-lvm2"
--- meta/classes-global/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-global/base.bbclass +1 -1
@@ -471,7 +471,7 @@ python () { def appendVar(varname, appends): if not appends: return - if varname.find("DEPENDS") != -1: + if varname.find("DEPENDS") != -1 or varname.find("RRECOMMENDS") != -1: if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d) : appends = expandFilter(appends, "", "nativesdk-") elif bb.data.inherits_class('native', d):
Signature · 1 line
2.25.1
This location looks odd. Shouldn’t it be done where rdepends is extended?
Alex
Quoted 57 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
After following commit in meta-oe,
[fe3ba7ac5ccryptsetup: demote udev runtime dependency to recommendation]bitbake lib32-cryptsetup will failed with error:
ERROR: QA Issue: lib32-cryptsetup package lib32-cryptsetup - suspicious values 'udev lvm2' in RRECOMMENDS [multilib]This is because RRECOMMENDS is not extended with mlprefix, with this fix, RRECOMMENDS:lib32-cryptsetup is corrected.
Without this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts udev lvm2"
Whith this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts lib32-udev lib32-lvm2"Signed-off-by Changqing Li <[email protected]>--- meta/classes-global/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes-global/base.bbclass +1
-1@@ -471,7 +471,7 @@ python () { def appendVar(varname, appends): if not appends: return - if varname.find("DEPENDS") != -1: + if varname.find("DEPENDS") != -1 or
varname.find("RRECOMMENDS")!= -1:
ifbb.data.inherits_class('nativesdk', d)orbb.data.inherits_class('cross-canadian', d):
appends =expandFilter(appends, "", "nativesdk-")
elifbb.data.inherits_class('native', d):
--
2.25.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#208405):
https://lists.openembedded.org/g/openembedded-core/message/208405
Mute This Topic: https://lists.openembedded.org/mt/109954831/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 26 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
After following commit in meta-oe,
[fe3ba7ac5ccryptsetup: demote udev runtime dependency to recommendation]bitbake lib32-cryptsetup will failed with error:
ERROR: QA Issue: lib32-cryptsetup package lib32-cryptsetup - suspicious values 'udev lvm2' in RRECOMMENDS [multilib]This is because RRECOMMENDS is not extended with mlprefix, with this fix, RRECOMMENDS:lib32-cryptsetup is corrected.
Without this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts udev lvm2" Whith this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts lib32-udev lib32-lvm2"Signed-off-by Changqing Li <[email protected]>---
meta/classes-global/base.bbclass | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)meta/classes-global/base.bbclass +0
-0@@ -471,7 +471,7 @@ python () {
Quoted 8 lines
def
appendVar(varname, appends):
if not appends:
return
- ifvarname.find("DEPENDS")!= -1:
+ ifvarname.find("DEPENDS")!= -1 orvarname.find("RRECOMMENDS")!= -1:
ifbb.data.inherits_class('nativesdk', d)orbb.data.inherits_class('cross-canadian', d):
appends =expandFilter(appends, "", "nativesdk-")
elifbb.data.inherits_class('native', d):
When proposing a change like this to something as core as base.bbclass, you need to explain why the issue is occurring and why it hasn't been seen before.
I couldn't see why this was a special case until I opened up base.bbclass locally, then I see that appendVar is in the PACKAGECONFIG processing block and that at least then lets me guess at the issue. I'm going to guess that these RRECOMMENDS are being added by some PACKAGECONFIG code. The commit message should mention that!
appendVar is called in the form:
appendVar('DEPENDS', extradeps)
appendVar('RDEPENDS:${PN}', extrardeps)
appendVar('RRECOMMENDS:${PN}', extrarrecs)
appendVar('PACKAGECONFIG_CONFARGS', extraconf)so there are a specific list of entries being processed and you're expanding that condition to include another of the cases.
I'd note that ".find() != -1" is old python and varname.startswith("RRECOMMENDS") would be much nicer in modern code.
Cheers,
Richard
________________________________
From: Richard Purdie <[email protected]>
Sent: Friday, December 6, 2024 6:40 PM
To: Li, Changqing <[email protected]>; [email protected] <[email protected]>
Subject: Re: [OE-core] [PATCH] base.bbclass: fix RRECOMMENDS extend issue for multilib
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 26 lines · Changqing Li via lists.openembedded.org
From: Changqing Li <[email protected]>
After following commit in meta-oe,
[fe3ba7ac5ccryptsetup: demote udev runtime dependency to recommendation]bitbake lib32-cryptsetup will failed with error:
ERROR: QA Issue: lib32-cryptsetup package lib32-cryptsetup - suspicious values 'udev lvm2' in RRECOMMENDS [multilib]This is because RRECOMMENDS is not extended with mlprefix, with this fix, RRECOMMENDS:lib32-cryptsetup is corrected.
Without this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts udev lvm2" Whith this fix:
RRECOMMENDS:lib32-cryptsetup="kernel-module-aes-generic kernel-module-cbc kernel-module-dm-crypt kernel-module-md5 kernel-module-sha256-generic kernel-module-xts lib32-udev lib32-lvm2"Signed-off-by Changqing Li <[email protected]>--- meta/classes-global/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes-global/base.bbclass +0
-0
meta/classes-global/base.bbclass python () { · line 477
Quoted 8 lines
meta/classes-global/base.bbclass +1
-1@@ -471,7 +471,7 @@ python () { def appendVar(varname, appends): if not appends: return - if varname.find("DEPENDS") != -1: + if varname.find("DEPENDS") != -1 or varname.find("RRECOMMENDS") != -1: if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d) : appends = expandFilter(appends, "", "nativesdk-") elif bb.data.inherits_class('native', d):
When proposing a change like this to something as core as base.bbclass, you need to explain why the issue is occurring and why it hasn't been seen before.
I couldn't see why this was a special case until I opened up base.bbclass locally, then I see that appendVar is in the PACKAGECONFIG processing block and that at least then lets me guess at the issue. I'm going to guess that these RRECOMMENDS are being added by some PACKAGECONFIG code. The commit message should mention that!
appendVar is called in the form:
appendVar('DEPENDS', extradeps)
appendVar('RDEPENDS:${PN}', extrardeps)
appendVar('RRECOMMENDS:${PN}', extrarrecs)
appendVar('PACKAGECONFIG_CONFARGS', extraconf)so there are a specific list of entries being processed and you're expanding that condition to include another of the cases.
I'd note that ".find() != -1" is old python and varname.startswith("RRECOMMENDS") would be much nicer in modern code.
Thanks Richard, I will update the commit message and the python code, send a V2.
Regards
Changqing
Cheers,
Richard