fixes for PACKAGECONFIG
cover fixes for PACKAGECONFIG
The following changes since commit 27d068d05239c26a3848eb101571acab54635e37:
harfbuzz: upgrade to 1.0.1 (2015-07-27 23:28:23 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/pkg
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/pkg
Robert Yang (2):
base.bbclass: move invalid PACKAGECONFIG checking to insane.bbclass base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
meta/classes/base.bbclass | 6 ++---- meta/classes/blacklist.bbclass | 2 ++ meta/classes/insane.bbclass | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 base.bbclass: move invalid PACKAGECONFIG checking to insane.bbclass
There was a problem when check invalid PACKAGECONFIG in the anonymous function (when parsing), for example, there are two versions of a recipe:
foo_1.0.bb
foo_2.0.bb
While foo_2.0.bb has a "PACKAGECONFIG[item] = 'x,y,z'", but foo_1.0.bb doesn't, if we set PACKAGECONFIG_pn-foo = "item" in a conf file, we would get the warning about invalid PACKAGECONFIG for foo_1.0.bb. Delay the checking to build time will fix the problem.
[YOCTO #8065]
--- meta/classes/base.bbclass | 4 ---- meta/classes/insane.bbclass | 11 +++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-)
meta/classes/base.bbclass +0 -4
@@ -340,10 +340,6 @@ python () { pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split() pn = d.getVar("PN", True) - for pconfig in pkgconfig: - if pconfig not in pkgconfigflags: - bb.warn("%s: invalid PACKAGECONFIG: %s" % (pn, pconfig)) - mlprefix = d.getVar("MLPREFIX", True) def expandFilter(appends, extension, prefix):
meta/classes/insane.bbclass +11 -0
@@ -31,6 +31,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \ installed-vs-shipped compile-host-path install-host-path \ pn-overrides infodir build-deps file-rdeps \ unknown-configure-option symlink-to-sysroot multilib \ + invalid-pkgconfig \ " ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1139,6 +1140,16 @@ Missing inherit gettext?""" % (gt, config)) package_qa_handle_error("unknown-configure-option", error_msg, d) except subprocess.CalledProcessError: pass + + # Check invalid PACKAGECONFIG + pkgconfig = (d.getVar("PACKAGECONFIG", True) or "").split() + if pkgconfig: + pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} + for pconfig in pkgconfig: + if pconfig not in pkgconfigflags: + pn = d.getVar('PN', True) + error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig) + package_qa_handle_error("invalid-pkgconfig", error_msg, d) } python do_qa_unpack() {
Signature · 1 line
1.7.9.5
PATCH 2/2 base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
In reply to Robert YangThe FOO[doc] is set in meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.
--- meta/classes/base.bbclass | 2 ++ meta/classes/blacklist.bbclass | 2 ++ 2 files changed, 4 insertions(+)
meta/classes/base.bbclass +2 -0
@@ -336,6 +336,8 @@ python () { # PACKAGECONFIG ??= "<default options>" # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends" pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} + # Remove PACKAGECONFIG[doc] + pkgconfigflags.pop('doc', None) if pkgconfigflags: pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split() pn = d.getVar("PN", True)
meta/classes/blacklist.bbclass +2 -0
@@ -28,6 +28,8 @@ python blacklist_multilib_eventhandler() { prefixes.append(eext[1]) blacklists = e.data.getVarFlags('PNBLACKLIST') or {} + # Remove PNBLACKLIST[doc] + blacklists.pop('doc', None) for pkg, reason in blacklists.items(): if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in pkg: continue
Signature · 1 line
1.7.9.5
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 14 lines · Robert Yang
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.Signed-off-by Robert Yang <[email protected]>--- meta/classes/base.bbclass | 2 ++ meta/classes/blacklist.bbclass | 2 ++ 2 files changed, 4 insertions(+)meta/classes/base.bbclass +0
-0
meta/classes/base.bbclass python () { · line 340
Quoted 5 lines
meta/classes/base.bbclass +2
-0@@ -336,6 +336,8 @@ python () { # PACKAGECONFIG ??= "<default options>" # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends" pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} + # Remove PACKAGECONFIG[doc] + pkgconfigflags.pop('doc', None)
This change breaks recipes which try to use 'doc' as a PACKAGECONFIG option. Nothing in oe-core tries to do that, but there are recipes in other layers which do (e.g. efl in meta-oe and lxc in meta-virtualization).
Could this change we reworked somehow to allow 'doc' to continue to be used as a PACKAGECONFIG option (as it is in fido)?
Quoted 24 lines
meta/classes/base.bbclass +0
-0if pkgconfigflags: pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split() pn = d.getVar("PN", True)meta/classes/blacklist.bbclass +2
-1@@ -28,6 +28,8 @@ python blacklist_multilib_eventhandler() { prefixes.append(eext[1]) blacklists = e.data.getVarFlags('PNBLACKLIST') or {} + # Remove PNBLACKLIST[doc] + blacklists.pop('doc', None) for pkg, reason in blacklists.items(): if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in pkg: continue --1.7.9.5
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 26 lines · Andre McCurdy
Quoted 14 lines · Robert Yang
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.Signed-off-by Robert Yang <[email protected]>--- meta/classes/base.bbclass | 2 ++ meta/classes/blacklist.bbclass | 2 ++ 2 files changed, 4 insertions(+)meta/classes/base.bbclass +0
-0meta/classes/base.bbclass python () { · line 340
Quoted 5 lines
meta/classes/base.bbclass +2
-0@@ -336,6 +336,8 @@ python () { # PACKAGECONFIG ??= "<default options>" # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends" pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} + # Remove PACKAGECONFIG[doc] + pkgconfigflags.pop('doc', None)This change breaks recipes which try to use 'doc' as a PACKAGECONFIG option. Nothing in oe-core tries to do that, but there are recipes in other layers which do (e.g. efl in meta-oe and lxc in meta-virtualization).
Quoted 2 lines
Could this change we reworked somehow to allow 'doc' to continue to be used as a PACKAGECONFIG option (as it is in fido)?
Hi Andre,
I'm afraid that there isn't any other way to fix the issue (many unneeded loops caused by PACKAGECONFIG[doc] which is set by documentation.conf), maybe you can change 'doc' to such as 'docs' in other layers ?
// Robert
Quoted 28 lines
Quoted 26 lines
meta/classes/base.bbclass +0
-0if pkgconfigflags: pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split() pn = d.getVar("PN", True)meta/classes/blacklist.bbclass +2
-1@@ -28,6 +28,8 @@ python blacklist_multilib_eventhandler() { prefixes.append(eext[1]) blacklists = e.data.getVarFlags('PNBLACKLIST') or {} + # Remove PNBLACKLIST[doc] + blacklists.pop('doc', None) for pkg, reason in blacklists.items(): if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in pkg: continue --1.7.9.5
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 5 lines · Robert Yang
I'm afraid that there isn't any other way to fix the issue (many unneeded loops caused by PACKAGECONFIG[doc] which is set by documentation.conf), maybe you can change 'doc' to such as 'docs' in other layers ?
Otavio is right - the commit doesn't explain what the problem is, and forcibly deleting PACKAGECONFIG[doc] options is very aggressive without good reason.
Ross
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
In reply to Robert YangQuoted 4 lines · Robert Yang
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.Signed-off-by Robert Yang <[email protected]>
It seems your commit log is incomplete or so as I couldn't understand why this is need.
Also as Andre says, we ought to not break existing layer without a very strong reason and if needed, changing documentation.conf instead of this seems more adequate.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 4 lines · Otavio Salvador
Quoted 3 lines · Robert Yang
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.
Quoted 9 lines
Quoted 1 line
Signed-off-by Robert Yang <[email protected]>It seems your commit log is incomplete or so as I couldn't understand why this is need.
Also as Andre says, we ought to not break existing layer without a very strong reason and if needed, changing documentation.conf instead of this seems more adequate.
The code in base.bbclass is: (no remove PACKAGECONFIG[doc])
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
if pkgconfigflags:
<foo>And documentation.conf:
PACKAGECONFIG[doc] = "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis."
This will make "if pkgconfigflags:" always be true and cause many unneeded loops since there is always PACKAGECONFIG[doc].
Remove PACKAGECONFIG[doc] or comment it sounds good to me.
// Robert
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 27 lines · Robert Yang
Quoted 10 lines · Otavio Salvador
Quoted 5 lines · Robert Yang
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.Signed-off-by Robert Yang <[email protected]>Quoted 7 lines
It seems your commit log is incomplete or so as I couldn't understand why this is need.
Also as Andre says, we ought to not break existing layer without a very strong reason and if needed, changing documentation.conf instead of this seems more adequate.
The code in base.bbclass is: (no remove PACKAGECONFIG[doc])
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} if pkgconfigflags: <foo>
Quoted 8 lines
And documentation.conf:
PACKAGECONFIG[doc] = "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis."This will make "if pkgconfigflags:" always be true and cause many unneeded loops since there is always PACKAGECONFIG[doc].
Remove PACKAGECONFIG[doc] or comment it sounds good to me.
So documentation.conf needs change.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 1 line · On Wednesday 12 August 2015 10:45:29 Otavio Salvador wrote:
On Tue, Aug 11, 2015 at 11:13 PM, Robert Yang <[email protected]>
Quoted 27 lines · wrote:
Quoted 27 lines · Otavio Salvador
Quoted 6 lines
On Thu, Jul 30, 2015 at 12:18 PM, Robert Yang <[email protected]>
Quoted 3 lines · wrote:
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.Quoted 8 lines
Quoted 1 line
Signed-off-by Robert Yang <[email protected]>It seems your commit log is incomplete or so as I couldn't understand why this is need.
Also as Andre says, we ought to not break existing layer without a very strong reason and if needed, changing documentation.conf instead of this seems more adequate.
The code in base.bbclass is: (no remove PACKAGECONFIG[doc])
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} if pkgconfigflags: <foo>And documentation.conf:
PACKAGECONFIG[doc] = "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis."
Quoted 6 lines
Quoted 4 lines
This will make "if pkgconfigflags:" always be true and cause many unneeded loops since there is always PACKAGECONFIG[doc].
Remove PACKAGECONFIG[doc] or comment it sounds good to me.
So documentation.conf needs change.
I'm not sure I'm particularly happy with this. Whilst its actual practical use is relatively recent (i.e. Toaster), documentation.conf and the doc varflag predate PACKAGECONFIG by quite some time. The fact that one layer has gone and used it is unfortunate but not unfixable.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 2/2] base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()
Quoted 33 lines · Paul Eggleton
Quoted 1 line · On Wednesday 12 August 2015 10:45:29 Otavio Salvador wrote:
On Tue, Aug 11, 2015 at 11:13 PM, Robert Yang <[email protected]>
Quoted 30 lines · wrote:
Quoted 30 lines · Otavio Salvador
Quoted 6 lines
On Thu, Jul 30, 2015 at 12:18 PM, Robert Yang <[email protected]>
Quoted 3 lines · wrote:
The FOO[doc] is set in
meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops.Quoted 8 lines
Quoted 1 line
Signed-off-by Robert Yang <[email protected]>It seems your commit log is incomplete or so as I couldn't understand why this is need.
Also as Andre says, we ought to not break existing layer without a very strong reason and if needed, changing documentation.conf instead of this seems more adequate.
The code in base.bbclass is: (no remove PACKAGECONFIG[doc])
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} if pkgconfigflags: <foo>And documentation.conf:
PACKAGECONFIG[doc] = "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis."This will make "if pkgconfigflags:" always be true and cause many unneeded loops since there is always PACKAGECONFIG[doc].
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Remove PACKAGECONFIG[doc] or comment it sounds good to me.
So documentation.conf needs change.
I'm not sure I'm particularly happy with this. Whilst its actual practical use is relatively recent (i.e. Toaster), documentation.conf and the doc varflag predate PACKAGECONFIG by quite some time. The fact that one layer has gone and used it is unfortunate but not unfixable.
I understand but this kind of magic keyword is misleading and confusing for users.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750