[OE-core] [PRService/meta 1/3] meta/PRService: Added export/import fuctions.

Christopher Larson kergoth at gmail.com
Fri Dec 30 14:06:40 UTC 2011


On Thursday, December 29, 2011 at 8:50 PM, Lianhao Lu wrote:
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 9040eb4..07d6f9a 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -351,10 +351,19 @@ def runtime_mapping_rename (varname, d):
> 
> python package_get_auto_pr() {
> if d.getVar('USE_PR_SERV', True) != "0":
> - auto_pr=prserv_get_pr_auto(d)
> - if auto_pr is None:
> - bb.fatal("Can NOT get auto PR revision from remote PR service")
> + try:
> + auto_pr=prserv_get_pr_auto(d)
> + except Exception as e:
> + bb.error(str(e))
> + raise bb.build.FuncFailed(e)


Don't do this. I realize there are flawed examples of this elsewhere in the metadata, but this isn't what FuncFailed is intended for. It's what the bitbake exec_func raises when a function fails, not what a function it executes should be raising.
-- 
Christopher Larson


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111230/db4d7ca8/attachment-0002.html>


More information about the Openembedded-core mailing list