[oe-commits] Khem Raj : geda-gattrib_1.4.3.bb: Fix bitbake parsing error

git version control git at git.openembedded.org
Sun Oct 4 08:12:47 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 4e7aae593601b4dd5a665e651bcf0a8a371b9267
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=4e7aae593601b4dd5a665e651bcf0a8a371b9267

Author: Khem Raj <raj.khem at gmail.com>
Date:   Sat Oct  3 16:13:46 2009 -0700

geda-gattrib_1.4.3.bb: Fix bitbake parsing error

ERROR: Error in executing python function in:
ERROR: Exception:<type 'exceptions.TypeError'> Message:list indices must
be integers, not NoneType
ERROR: Printing the environment of the function
ERROR:  0001:def __anonfunc():
ERROR:  0002:    import bb
ERROR:  0003:    from bb import __version__
ERROR:  0004:    base_after_parse(d)
ERROR:  0005:
ERROR: Function __anonfunc failed
ERROR: ('function __anonfunc failed',
'/home/kraj/work/oe/build/anonfunc//log.__anonfunc.13347.0.848951115496')
while parsing
/home/kraj/work/oe/openembedded/recipes/geda/geda-gattrib_1.4.3.bb

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 recipes/geda/geda-gattrib_1.4.3.bb |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/recipes/geda/geda-gattrib_1.4.3.bb b/recipes/geda/geda-gattrib_1.4.3.bb
index 1bd3393..02f96b0 100644
--- a/recipes/geda/geda-gattrib_1.4.3.bb
+++ b/recipes/geda/geda-gattrib_1.4.3.bb
@@ -5,9 +5,15 @@ PR = "r1"
 
 DEPENDS = "gtk+ libgeda"
 
-SRC_URI = "http://geda.seul.org/release/v1.4/${PV}/${P}.tar.gz \
-      ${@['file://gattrib-gtk218.patch;patch=1', ''][bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1) and bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1).split('.')[0] <= '2' and bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1).split('.')[1] < '18']}"
-
+SRC_URI = "http://geda.seul.org/release/v1.4/${PV}/${P}.tar.gz"
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--disable-update-desktop-database"
+
+do_patch_prepend() {
+        import bb
+        if bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1) and
+        bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1).split('.')[0] <= '2' and 
+        bb.data.getVar('PREFERRED_VERSION_gtk+', d, 1).split('.')[1] < '18':
+            SRC_URI_append = "file://gattrib-gtk218.patch;patch=1"
+}





More information about the Openembedded-commits mailing list