a sanity check fix for a better error
cover a sanity check fix for a better error
From: Nitin A Kamble <[email protected]>
Here is a commit to give a better error regarding missing required distro features.
Thanks,
Nitin
The following changes since commit 6382979cca1d1c57467f983ba9611f91555b20a9:
cronie: fix out of tree build (2013-08-19 11:25:23 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib nitin/misc
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc
Nitin A Kamble (1):
sanity.bbclass: a new check for required distro features
meta/classes/sanity.bbclass | 7 +++++++ 1 file changed, 7 insertions(+)
Signature · 1 line
1.8.1.4
PATCH 1/1 sanity.bbclass: a new check for required distro features
From: Nitin A Kamble <[email protected]>
Some BSPs need to have some specific distro_features enabled. These BSPs fail to build when these required DISTRO features are not enabled. And the issue is, there is no clue in the build error, about why the build is failing.
This commit addresses the issue by adding a generic mechanism to
check for enablement of the required distro features.
Now these BSPs can specify in their BSP config, what distro features are required, and if these are not enabled then appropriate build error is thrown to help fix the issue.
--- meta/classes/sanity.bbclass | 7 +++++++ 1 file changed, 7 insertions(+)
meta/classes/sanity.bbclass +7 -0
@@ -603,6 +603,13 @@ def check_sanity_everybuild(status, d): if not ( check_conf_exists("conf/distro/${DISTRO}.conf", d) or check_conf_exists("conf/distro/include/${DISTRO}.inc", d) ): status.addresult("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % d.getVar("DISTRO", True)) + # check all the required DISTRO_FEATURES are enabled + distro_features_split = (d.getVar('DISTRO_FEATURES', True) or "").split() + required_distro_features_split = (d.getVar('REQUIRED_DISTRO_FEATURES', True) or "").split() + for rdf in required_distro_features_split: + if rdf not in distro_features_split: + status.addresult("%s is required in DISTRO_FEATURES" % rdf) + # Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't # set, since so much relies on it being set. dldir = d.getVar('DL_DIR', True)
Signature · 1 line
1.8.1.4
Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features
Quoted 3 lines · On 19 August 2013 20:22, <[email protected]> wrote:
Now these BSPs can specify in their BSP config, what distro features are required, and if these are not enabled then appropriate build error is thrown to help fix the issue.
Are there any situations where these distro feature dependencies can't be expressed more precisely in a package recipe, and then something like Otavio's approach of throwing a SkipPackage used?
Ross
Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features
Quoted 8 lines · Ross
Quoted 3 lines · On 19 August 2013 20:22, <[email protected]> wrote:
Now these BSPs can specify in their BSP config, what distro features are required, and if these are not enabled then appropriate build error is thrown to help fix the issue.
Are there any situations where these distro feature dependencies can't be expressed more precisely in a package recipe, and then something like Otavio's approach of throwing a SkipPackage used?
I have several cases in meta-fsl-demos. Vivante GPU driver provides different libraries depending on the backend to use (DirectFB, FB, Wayland and X11) and they cannot be used at same time. So depending on distro features setting some images are buildable or not.
In fact I see same case in OE-Core; core-image-weston /depends/ on wayland distro feature and this is not explicit in metadata nowadays.
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 1/1] sanity.bbclass: a new check for required distro features
Quoted 8 lines · Otavio Salvador
Quoted 3 lines
Are there any situations where these distro feature dependencies can't be expressed more precisely in a package recipe, and then something like Otavio's approach of throwing a SkipPackage used?
I have several cases in meta-fsl-demos. Vivante GPU driver provides different libraries depending on the backend to use (DirectFB, FB, Wayland and X11) and they cannot be used at same time. So depending on distro features setting some images are buildable or not.
And does distro_features_check.bbclass work for those?
Quoted 2 lines
In fact I see same case in OE-Core; core-image-weston /depends/ on wayland distro feature and this is not explicit in metadata nowadays.
Yes, and it should definitely be checked for.
Ross
Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features
Quoted 11 lines · Ross
Quoted 8 lines · Otavio Salvador
Quoted 3 lines
Are there any situations where these distro feature dependencies can't be expressed more precisely in a package recipe, and then something like Otavio's approach of throwing a SkipPackage used?
I have several cases in meta-fsl-demos. Vivante GPU driver provides different libraries depending on the backend to use (DirectFB, FB, Wayland and X11) and they cannot be used at same time. So depending on distro features setting some images are buildable or not.
And does distro_features_check.bbclass work for those?
Yes; I did it to accomplish our needs. So it does.
Quoted 4 lines
Quoted 2 lines
In fact I see same case in OE-Core; core-image-weston /depends/ on wayland distro feature and this is not explicit in metadata nowadays.
Yes, and it should definitely be checked for.
Agreed.
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