[OE-core] [mesa][PATCH v2 1/1] Fix mesa_populate_packages() when dri is disabled

Martin Jansa martin.jansa at gmail.com
Wed May 18 15:32:27 UTC 2016


On Wed, May 18, 2016 at 05:26:16PM +0200, Herve Jourdain wrote:
> Hi Martin,
> 
> Even though the line just below uses "+"? Or shall I modify both?

Ah that's where it came from. Sorry I haven't noticed that it was
already there.

Please ignore what I said, os.path.join won't work anyway, because
libdir starts with slash so os.path.join would just return that part.

Thanks and sorry for noise

> -----Original Message-----
> From: Martin Jansa [mailto:martin.jansa at gmail.com] 
> Sent: mercredi 18 mai 2016 16:15
> To: Herve Jourdain <herve.jourdain at neuf.fr>
> Cc: openembedded-core at lists.openembedded.org
> Subject: Re: [OE-core] [mesa][PATCH v2 1/1] Fix mesa_populate_packages()
> when dri is disabled
> 
> On Wed, May 18, 2016 at 08:33:37PM +0800, Herve Jourdain wrote:
> > When compiling mesa, if dri is disabled in PACKAGECONFIG, or if the list
> of DRI drivers is empty, it will cause populate_package to fail, because it
> can't find - rightfully - the directory for the DRI drivers.
> > This patch checks that the directory indeed exists before trying to get a
> list of the files in it
> > 
> > Signed-off-by: Herve Jourdain <herve.jourdain at neuf.fr>
> > ---
> >  meta/recipes-graphics/mesa/mesa.inc | 19 ++++++++++---------
> >  1 file changed, 10 insertions(+), 9 deletions(-)
> > 
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc
> b/meta/recipes-graphics/mesa/mesa.inc
> > index a4e5351..0e46092 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -143,15 +143,16 @@ python mesa_populate_packages() {
> >  
> >      import re
> >      dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri")
> > -    dri_pkgs = os.listdir(d.getVar('PKGD', True) + dri_drivers_root)
> > -    lib_name = d.expand("${MLPREFIX}mesa-megadriver")
> > -    for p in dri_pkgs:
> > -        m = re.match('^(.*)_dri\.so$', p)
> > -        if m:
> > -            pkg_name = " ${MLPREFIX}mesa-driver-%s" %
> legitimize_package_name(m.group(1))
> > -            d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
> > -            d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
> > -            d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
> > +    if os.path.isdir(d.getVar('PKGD', True) + dri_drivers_root):
> 
> Use os.path.join instead of +
> 
> > +        dri_pkgs = os.listdir(d.getVar('PKGD', True) + dri_drivers_root)
> > +        lib_name = d.expand("${MLPREFIX}mesa-megadriver")
> > +        for p in dri_pkgs:
> > +            m = re.match('^(.*)_dri\.so$', p)
> > +            if m:
> > +                pkg_name = " ${MLPREFIX}mesa-driver-%s" %
> legitimize_package_name(m.group(1))
> > +                d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
> > +                d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
> > +                d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
> >  
> >      pipe_drivers_root = os.path.join(d.getVar('libdir', True),
> "gallium-pipe")
> >      do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$',
> 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
> > -- 
> > 2.7.4
> > 
> > -- 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160518/715c5a24/attachment-0002.sig>


More information about the Openembedded-core mailing list