Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2] pango: don't try to split modules if none were installed
@ 2012-09-30 17:48 Phil Blundell
       [not found] ` <430F096FEBAC48CB95BE1DE3D0F1A5CC@intel.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Blundell @ 2012-09-30 17:48 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
v2: can't use os.path.join() with modules_root as 2nd argument

 meta/recipes-graphics/pango/pango.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index c9e92f0..18ee068 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -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(d.expand('${WORKDIR}/package') + 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}"
-- 
1.7.9






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] pango: don't try to split modules if none were installed
       [not found] ` <430F096FEBAC48CB95BE1DE3D0F1A5CC@intel.com>
@ 2012-09-30 21:28   ` Phil Blundell
  2012-10-12 11:07     ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Blundell @ 2012-09-30 21:28 UTC (permalink / raw)
  To: Ross Burton; +Cc: oe-core

On Sun, 2012-09-30 at 19:31 +0100, Ross Burton wrote:
> As this keeps on cropping up, I did have a patch to do_split_packages
> that added an allow-empty argument. Might be worth digging out. 

Sounds like a decent plan.

p.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] pango: don't try to split modules if none were installed
  2012-09-30 21:28   ` Phil Blundell
@ 2012-10-12 11:07     ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2012-10-12 11:07 UTC (permalink / raw)
  To: Phil Blundell; +Cc: oe-core

On 30 September 2012 22:28, Phil Blundell <philb@gnu.org> wrote:
> On Sun, 2012-09-30 at 19:31 +0100, Ross Burton wrote:
>> As this keeps on cropping up, I did have a patch to do_split_packages
>> that added an allow-empty argument. Might be worth digging out.
>
> Sounds like a decent plan.

So do_split_packages() effectively has this if you set recursive=True,
as os.walk() returns an empty list if you pass it a non-existent
directory (it's documented as ignoring errors from os.listdir).

So, what is the behaviour do_split_packages() should have if the split
root doesn't exist - should it error, ignore, or there be an option?

(note that pre-automake 1.12 this rarely happened because the
directory would exist but be empty, now with 1.12 it doesn't install
empty directories)

Ross



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-12 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 17:48 [PATCH v2] pango: don't try to split modules if none were installed Phil Blundell
     [not found] ` <430F096FEBAC48CB95BE1DE3D0F1A5CC@intel.com>
2012-09-30 21:28   ` Phil Blundell
2012-10-12 11:07     ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox