Skip to contentSkip to conversation

pango: don't try to split modules if none were installed

PATCH Superseded Phil Blundell 1 participant 2 messages Sep 30, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pango: don't try to split modules if none were installed

If pango is configured --with-included-modules then the modules directory may not exist. Trying to call do_split_modules() on a nonexistent path leads to python stack traceback spew and a build failure, so check in advance whether that directory is present before trying to do any splitting.

---
 meta/recipes-graphics/pango/pango.inc |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-graphics/pango/pango.inc +3 -2
index c9e92f0..8eb920a 100644
@@ -64,8 +64,9 @@ python populate_packages_prepend () {
     prologue = d.getVar("postinst_prologue", True)
 
     modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
-
-    do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
+    
+    if os.path.exists(os.path.join(d.expand('${D}'), modules_root)):
+       do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
 }
 
 FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
Signature · 1 line
1.7.10.4
#1 lore raw

meta/recipes-graphics/pango/pango.inc python populate_packages_prepend () { · line 70

Quoted 5 lines · Phil Blundell
meta/recipes-graphics/pango/pango.inc +3 -1
-    do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
+    
+    if os.path.exists(os.path.join(d.expand('${D}'), modules_root)):
+       do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
 }

Hm, I seem to have sent the wrong version of this patch. Please ignore that one.

p.