Patchwork pango: Avoid build failure if no modules were installed

login
register
mail settings
Submitter Phil Blundell
Date April 26, 2013, 11:35 a.m.
Message ID <1366976132.14512.100.camel@phil-desktop.brightsign>
Download mbox | patch
Permalink /patch/48939/
State New
Headers show

Comments

Phil Blundell - April 26, 2013, 11:35 a.m.
If pango is configured --with-included-modules then the modules
directory may not exist.  This leads to python traceback spew and
a build failure when trying to run do_split_packages().

Fix this by passing recursive=True to do_split_packages(), which has
the side-effect of making it ignore nonexistent directories.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/recipes-graphics/pango/pango.inc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Ross Burton - April 26, 2013, 11:43 a.m.
On 26 April 2013 12:35, Phil Blundell <pb@pbcl.net> wrote:
> If pango is configured --with-included-modules then the modules
> directory may not exist.  This leads to python traceback spew and
> a build failure when trying to run do_split_packages().
>
> Fix this by passing recursive=True to do_split_packages(), which has
> the side-effect of making it ignore nonexistent directories.

I thought I fixed this:

commit 348897358736c28240c084affaca5b4e2fbe499a
Author: Ross Burton <ross.burton@intel.com>
Date:   Thu Dec 6 12:53:14 2012 +0000

    package.bbclass: make do_split_packages handle non-existent root directories

    This function has different behaviour if the split directory doesn't exist
    depending on the recursive argument: non-recursive uses
os.listdirs which throws
    an exception, recursive uses os.walk which doesn't.

    do_split_packages should silently handle non-existent directories
because it's
    mainly used for plugin directories, which may end up being empty
though changing
    the distro configuration (for example, connman without wifi distro feature).

    So, add an early exit if the split root doesn't exist.

    (From OE-Core rev: 937101e3fdd6afd00f6f8a8be411a67110c4ae78)

Presumably this patch is from Danny or earlier, as this shouldn't
happen in Dylan.

For that reason, NACK for master/dylan.  If you are continuing to use
Danny then I can merge it there for 1.3.2?

Ross
Phil Blundell - April 26, 2013, 4:31 p.m.
On Fri, 2013-04-26 at 12:43 +0100, Burton, Ross wrote:
> On 26 April 2013 12:35, Phil Blundell <pb@pbcl.net> wrote:
> > If pango is configured --with-included-modules then the modules
> > directory may not exist.  This leads to python traceback spew and
> > a build failure when trying to run do_split_packages().
> >
> > Fix this by passing recursive=True to do_split_packages(), which has
> > the side-effect of making it ignore nonexistent directories.
> 
> I thought I fixed this:

Oh yes, so you did; apparently I somehow failed to notice that.  Please
ignore my patch then.

p.

Patch

diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index f622903..0051bd2 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -72,8 +72,8 @@  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')
+    
+    do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules', recursive=True)
 }
 
 FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"