From: Christopher Larson <kergoth@gmail.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PRService/meta 1/3] meta/PRService: Added export/import fuctions.
Date: Fri, 30 Dec 2011 07:06:40 -0700 [thread overview]
Message-ID: <BF6213F961304DF4B3C0F85E33560FE1@gmail.com> (raw)
In-Reply-To: <6ad22f9852cfd011244b3e511f5e563007f7ac5c.1325215668.git.lianhao.lu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2141 bytes --]
next prev parent reply other threads:[~2011-12-30 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-30 3:50 [PRService/meta 0/3] new PRService features in meta Lianhao Lu
2011-12-30 3:50 ` [PRService/meta 1/3] meta/PRService: Added export/import fuctions Lianhao Lu
2011-12-30 14:06 ` Christopher Larson [this message]
2011-12-30 3:50 ` [PRService/meta 2/3] package.bbclass: per recipe PRSERV_HOST support Lianhao Lu
2011-12-30 3:50 ` [PRService/meta 3/3] conf/bitbake.conf: basichash as default signature Lianhao Lu
2011-12-30 6:43 ` Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BF6213F961304DF4B3C0F85E33560FE1@gmail.com \
--to=kergoth@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox