All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Herve Jourdain <herve.jourdain@neuf.fr>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [mesa][PATCH v2 1/1] Fix mesa_populate_packages() when dri is disabled
Date: Wed, 18 May 2016 16:14:44 +0200	[thread overview]
Message-ID: <20160518141444.GC2579@jama> (raw)
In-Reply-To: <1463574817-22238-2-git-send-email-herve.jourdain@neuf.fr>

[-- Attachment #1: Type: text/plain, Size: 2608 bytes --]

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@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@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

  reply	other threads:[~2016-05-18 14:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 12:33 [mesa][PATCH v2 0/1] Fix mesa_populate_packages() when dri is disabled Herve Jourdain
2016-05-18 12:33 ` [mesa][PATCH v2 1/1] " Herve Jourdain
2016-05-18 14:14   ` Martin Jansa [this message]
2016-05-18 15:26     ` Herve Jourdain
2016-05-18 15:32       ` Martin Jansa
2016-05-18 19:34         ` Burton, Ross
2016-05-18 15:54     ` Burton, Ross
2016-05-18 19:39       ` Otavio Salvador
2016-05-18 19:52         ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160518141444.GC2579@jama \
    --to=martin.jansa@gmail.com \
    --cc=herve.jourdain@neuf.fr \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.