* [PATCH] classes/native*.bbclass: fix error during parse with bitbake master
@ 2011-06-22 9:13 Paul Eggleton
2011-06-22 9:27 ` Koen Kooi
2011-06-22 9:48 ` Phil Blundell
0 siblings, 2 replies; 5+ messages in thread
From: Paul Eggleton @ 2011-06-22 9:13 UTC (permalink / raw)
To: openembedded-devel
Fixes "AttributeError: 'NoneType' object has no attribute 'split'" during
parsing with bitbake master. We should not be calling explode_deps with
None as the argument, so check for that before calling it.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
classes/native.bbclass | 5 ++++-
classes/nativesdk.bbclass | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 1e7a6ec..e9d48a3 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -116,7 +116,10 @@ python __anonymous () {
if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
pn = bb.data.getVar("PN", d, True)
depends = bb.data.getVar("DEPENDS_virtclass-native", d, True)
- deps = bb.utils.explode_deps(depends)
+ if depends:
+ deps = bb.utils.explode_deps(depends)
+ else:
+ deps = []
newdeps = []
for dep in deps:
if dep.endswith("-cross"):
diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
index 6689399..7a8f385 100644
--- a/classes/nativesdk.bbclass
+++ b/classes/nativesdk.bbclass
@@ -59,7 +59,10 @@ OVERRIDES =. "virtclass-nativesdk:"
python __anonymous () {
pn = bb.data.getVar("PN", d, True)
depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True)
- deps = bb.utils.explode_deps(depends)
+ if depends:
+ deps = bb.utils.explode_deps(depends)
+ else:
+ deps = []
newdeps = []
for dep in deps:
if dep.endswith("-native") or dep.endswith("-cross"):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] classes/native*.bbclass: fix error during parse with bitbake master
2011-06-22 9:13 [PATCH] classes/native*.bbclass: fix error during parse with bitbake master Paul Eggleton
@ 2011-06-22 9:27 ` Koen Kooi
2011-06-22 9:48 ` Phil Blundell
1 sibling, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2011-06-22 9:27 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 22-06-11 11:13, Paul Eggleton wrote:
> Fixes "AttributeError: 'NoneType' object has no attribute 'split'" during
> parsing with bitbake master. We should not be calling explode_deps with
> None as the argument, so check for that before calling it.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Looks good to me:
Acked-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> classes/native.bbclass | 5 ++++-
> classes/nativesdk.bbclass | 5 ++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/classes/native.bbclass b/classes/native.bbclass
> index 1e7a6ec..e9d48a3 100644
> --- a/classes/native.bbclass
> +++ b/classes/native.bbclass
> @@ -116,7 +116,10 @@ python __anonymous () {
> if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
> pn = bb.data.getVar("PN", d, True)
> depends = bb.data.getVar("DEPENDS_virtclass-native", d, True)
> - deps = bb.utils.explode_deps(depends)
> + if depends:
> + deps = bb.utils.explode_deps(depends)
> + else:
> + deps = []
> newdeps = []
> for dep in deps:
> if dep.endswith("-cross"):
> diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
> index 6689399..7a8f385 100644
> --- a/classes/nativesdk.bbclass
> +++ b/classes/nativesdk.bbclass
> @@ -59,7 +59,10 @@ OVERRIDES =. "virtclass-nativesdk:"
> python __anonymous () {
> pn = bb.data.getVar("PN", d, True)
> depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True)
> - deps = bb.utils.explode_deps(depends)
> + if depends:
> + deps = bb.utils.explode_deps(depends)
> + else:
> + deps = []
> newdeps = []
> for dep in deps:
> if dep.endswith("-native") or dep.endswith("-cross"):
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFOAbV/MkyGM64RGpERAmpPAJ9OxqPqnYkcACLshJHBf2B2ta1FQgCfRadV
O+QuQwiB6rHxDcDeUkwydew=
=fWJI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] classes/native*.bbclass: fix error during parse with bitbake master
2011-06-22 9:13 [PATCH] classes/native*.bbclass: fix error during parse with bitbake master Paul Eggleton
2011-06-22 9:27 ` Koen Kooi
@ 2011-06-22 9:48 ` Phil Blundell
2011-06-22 10:18 ` [PATCH v2] " Paul Eggleton
1 sibling, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-06-22 9:48 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2011-06-22 at 10:13 +0100, Paul Eggleton wrote:
> depends = bb.data.getVar("DEPENDS_virtclass-native", d, True)
> - deps = bb.utils.explode_deps(depends)
> + if depends:
> + deps = bb.utils.explode_deps(depends)
> + else:
> + deps = []
Can't you just make the first line be something like
depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) or ""
?
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] classes/native*.bbclass: fix error during parse with bitbake master
2011-06-22 9:48 ` Phil Blundell
@ 2011-06-22 10:18 ` Paul Eggleton
2011-06-23 23:26 ` Andrea Adami
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2011-06-22 10:18 UTC (permalink / raw)
To: openembedded-devel
Fixes "AttributeError: 'NoneType' object has no attribute 'split'" during
parsing with bitbake master. We should not be calling explode_deps with
None as the argument, so ensure the value isn't None.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
classes/native.bbclass | 2 +-
classes/nativesdk.bbclass | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 1e7a6ec..6f30471 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -115,7 +115,7 @@ python __anonymous () {
if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
pn = bb.data.getVar("PN", d, True)
- depends = bb.data.getVar("DEPENDS_virtclass-native", d, True)
+ depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) or ""
deps = bb.utils.explode_deps(depends)
newdeps = []
for dep in deps:
diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
index 6689399..6607abf 100644
--- a/classes/nativesdk.bbclass
+++ b/classes/nativesdk.bbclass
@@ -58,7 +58,7 @@ OVERRIDES =. "virtclass-nativesdk:"
python __anonymous () {
pn = bb.data.getVar("PN", d, True)
- depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True)
+ depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True) or ""
deps = bb.utils.explode_deps(depends)
newdeps = []
for dep in deps:
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] classes/native*.bbclass: fix error during parse with bitbake master
2011-06-22 10:18 ` [PATCH v2] " Paul Eggleton
@ 2011-06-23 23:26 ` Andrea Adami
0 siblings, 0 replies; 5+ messages in thread
From: Andrea Adami @ 2011-06-23 23:26 UTC (permalink / raw)
To: openembedded-devel
On Wed, Jun 22, 2011 at 12:18 PM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Fixes "AttributeError: 'NoneType' object has no attribute 'split'" during
> parsing with bitbake master. We should not be calling explode_deps with
> None as the argument, so ensure the value isn't None.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> classes/native.bbclass | 2 +-
> classes/nativesdk.bbclass | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
<snip>
Acked-by: Andrea Adami <andrea.adami@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-23 23:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 9:13 [PATCH] classes/native*.bbclass: fix error during parse with bitbake master Paul Eggleton
2011-06-22 9:27 ` Koen Kooi
2011-06-22 9:48 ` Phil Blundell
2011-06-22 10:18 ` [PATCH v2] " Paul Eggleton
2011-06-23 23:26 ` Andrea Adami
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.