From: Saul Wold <sgw@linux.intel.com>
To: Ross Burton <ross.burton@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2] base: improve PACKAGECONFIG handling logic
Date: Wed, 11 Sep 2013 20:30:05 -0700 [thread overview]
Message-ID: <5231353D.6070604@linux.intel.com> (raw)
In-Reply-To: <1378923463-31773-1-git-send-email-ross.burton@intel.com>
On 09/11/2013 11:17 AM, Ross Burton wrote:
> The existing code for handling PACKAGECONFIG lists wasn't the cleanest Python
> around. Instead of diving into the list directly using indices and lengths, use
> pop() to iterate through the list.
>
I started to get some strange behaviour with building world,
specifically, rpm-native stopped building. You can test this by
cleaning beecrypt-native and then try to build rpm-native.
Sau!
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/classes/base.bbclass | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index dfa580c..37dc790 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -420,7 +420,7 @@ python () {
> def appendVar(varname, appends):
> if not appends:
> return
> - if varname.find("DEPENDS") != -1:
> + if "DEPENDS_" in varname:
> if pn.startswith("nativesdk-"):
> appends = expandFilter(appends, "", "nativesdk-")
> if pn.endswith("-native"):
> @@ -442,12 +442,21 @@ python () {
> bb.error("Only enable,disable,depend,rdepend can be specified!")
>
> if flag in pkgconfig:
> - if num >= 3 and items[2]:
> - extradeps.append(items[2])
> - if num >= 4 and items[3]:
> - extrardeps.append(items[3])
> - if num >= 1 and items[0]:
> - extraconf.append(items[0])
> + if items:
> + item = items.pop(0)
> + if item:
> + extraconf.append(item)
> + # Skip over disable
> + if items:
> + items.pop(0)
> + if items:
> + item = items.pop(0)
> + if item:
> + extradeps.append(item)
> + if items:
> + item = items.pop(0)
> + if item:
> + extrardeps.append(item)
> elif num >= 2 and items[1]:
> extraconf.append(items[1])
> appendVar('DEPENDS', extradeps)
>
next prev parent reply other threads:[~2013-09-12 3:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 18:17 [PATCH 1/2] base: improve PACKAGECONFIG handling logic Ross Burton
2013-09-11 18:17 ` [PATCH 2/2] base: add RRECOMMENDS to PACKAGECONFIG Ross Burton
2013-09-12 3:30 ` Saul Wold [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-10 17:15 [PATCH 1/2] base: improve PACKAGECONFIG handling logic Ross Burton
2013-09-10 17:17 ` Burton, Ross
2013-09-10 18:49 ` 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=5231353D.6070604@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.