providers: Use new override syntax when handling pn- "override"
Quoted 21 lines
-----Original Message-----
From: [email protected] <bitbake- [email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 26 augusti 2021 19:37
To: [email protected]
Subject: [bitbake-devel] [PATCH] providers: Use new override syntax when handling pn- "override"Make
versionVariableMatch()support pn-foo overrides using the new override syntax.Signed-off-by Peter Kjellerstedt <[email protected]>--- bitbake/lib/bb/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bitbake/lib/bb/providers.py +0
-0
bitbake/lib/bb/providers.py def versionVariableMatch(cfgData, keyword, pn): · line 100
Quoted 8 lines
bitbake/lib/bb/providers.py +1
-1@@ -94,7 +94,7 @@ def versionVariableMatch(cfgData, keyword, pn): # pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot # hence we do this manually rather than use OVERRIDES - ver = cfgData.getVar("%s_VERSION_pn-%s" % (keyword, pn)) + ver = cfgData.getVar("%s_VERSION:pn-%s" % (keyword, pn)) if not ver: ver = cfgData.getVar("%s_VERSION_%s" % (keyword, pn)) if not ver:
I do not know why PREFERRED_VERSION_<foo> & co have not been changed to the new syntax, but I will argue that at least PREFERRED_VERSION_pn-<foo> should be changed to PREFERRED_VERSION:pn-<foo> as per above to not cause confusion. Though I am unsure if anyone actually uses that format, at least I didn't know it was even supported until I found the above code.
//Peter
Quoted 22 lines · Peter Kjellerstedt
Quoted 22 lines
-----Original Message-----
From: [email protected] <bitbake- [email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 26 augusti 2021 19:37
To: [email protected]
Subject: [bitbake-devel] [PATCH] providers: Use new override syntax when handling pn- "override"Make
versionVariableMatch()support pn-foo overrides using the new override syntax.Signed-off-by Peter Kjellerstedt <[email protected]>---
bitbake/lib/bb/providers.py | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)bitbake/lib/bb/providers.py +0
-0@@ -94,7 +94,7 @@ def versionVariableMatch(cfgData, keyword, pn):
Quoted 13 lines
Quoted 7 lines
bitbake/lib/bb/providers.py +1
-1# pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot # hence we do this manually rather than use OVERRIDES - ver = cfgData.getVar("%s_VERSION_pn-%s" % (keyword, pn)) + ver = cfgData.getVar("%s_VERSION:pn-%s" % (keyword, pn))if not ver:
ver =cfgData.getVar("%s_VERSION_%s" % (keyword, pn))if not ver:I do not know why PREFERRED_VERSION_<foo> & co have not been changed to the new syntax, but I will argue that at least PREFERRED_VERSION_pn-<foo> should be changed to PREFERRED_VERSION:pn-<foo> as per above to not cause confusion. Though I am unsure if anyone actually uses that format, at least I didn't know it was even supported until I found the above code.
I think this was some plan of mine to migrate PREF_VER_<name> to PREF_VER_pn- which would at least be more consistent with how we do things. The pn- override was much more recent that the original variable. Obviously the plan didn't get far.
Rather than change PREF_VER_ to PREF_VER:, I'd probably propose we move over to pn-.
Cheers,
Richard