* [PATCH 0/1] a sanity check fix for a better error @ 2013-08-19 19:22 nitin.a.kamble 2013-08-19 19:22 ` [PATCH 1/1] sanity.bbclass: a new check for required distro features nitin.a.kamble 0 siblings, 1 reply; 6+ messages in thread From: nitin.a.kamble @ 2013-08-19 19:22 UTC (permalink / raw) To: Openembedded-core From: Nitin A Kamble <nitin.a.kamble@intel.com> 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(+) -- 1.8.1.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] sanity.bbclass: a new check for required distro features 2013-08-19 19:22 [PATCH 0/1] a sanity check fix for a better error nitin.a.kamble @ 2013-08-19 19:22 ` nitin.a.kamble 2013-08-20 11:11 ` Burton, Ross 0 siblings, 1 reply; 6+ messages in thread From: nitin.a.kamble @ 2013-08-19 19:22 UTC (permalink / raw) To: Openembedded-core From: Nitin A Kamble <nitin.a.kamble@intel.com> 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. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> --- meta/classes/sanity.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 4df3ca8..6f9ad5f 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -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) -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features 2013-08-19 19:22 ` [PATCH 1/1] sanity.bbclass: a new check for required distro features nitin.a.kamble @ 2013-08-20 11:11 ` Burton, Ross 2013-08-20 11:58 ` Otavio Salvador 0 siblings, 1 reply; 6+ messages in thread From: Burton, Ross @ 2013-08-20 11:11 UTC (permalink / raw) To: nitin.a.kamble; +Cc: Openembedded-core On 19 August 2013 20:22, <nitin.a.kamble@intel.com> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features 2013-08-20 11:11 ` Burton, Ross @ 2013-08-20 11:58 ` Otavio Salvador 2013-08-20 12:01 ` Burton, Ross 0 siblings, 1 reply; 6+ messages in thread From: Otavio Salvador @ 2013-08-20 11:58 UTC (permalink / raw) To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer On Tue, Aug 20, 2013 at 8:11 AM, Burton, Ross <ross.burton@intel.com> wrote: > On 19 August 2013 20:22, <nitin.a.kamble@intel.com> 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. -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features 2013-08-20 11:58 ` Otavio Salvador @ 2013-08-20 12:01 ` Burton, Ross 2013-08-20 12:10 ` Otavio Salvador 0 siblings, 1 reply; 6+ messages in thread From: Burton, Ross @ 2013-08-20 12:01 UTC (permalink / raw) To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer On 20 August 2013 12:58, Otavio Salvador <otavio@ossystems.com.br> wrote: >> 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? > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: a new check for required distro features 2013-08-20 12:01 ` Burton, Ross @ 2013-08-20 12:10 ` Otavio Salvador 0 siblings, 0 replies; 6+ messages in thread From: Otavio Salvador @ 2013-08-20 12:10 UTC (permalink / raw) To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer On Tue, Aug 20, 2013 at 9:01 AM, Burton, Ross <ross.burton@intel.com> wrote: > On 20 August 2013 12:58, Otavio Salvador <otavio@ossystems.com.br> wrote: >>> 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. >> 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. -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-20 12:10 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-08-19 19:22 [PATCH 0/1] a sanity check fix for a better error nitin.a.kamble 2013-08-19 19:22 ` [PATCH 1/1] sanity.bbclass: a new check for required distro features nitin.a.kamble 2013-08-20 11:11 ` Burton, Ross 2013-08-20 11:58 ` Otavio Salvador 2013-08-20 12:01 ` Burton, Ross 2013-08-20 12:10 ` Otavio Salvador
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox