[oe-commits] [openembedded-core] 13/16: mesa: fix mesa_populate_packages() when dri is disabled

git at git.openembedded.org git at git.openembedded.org
Fri May 20 09:21:45 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 7e96806d1282865761fcc047abcb72970279d82d
Author: Herve Jourdain <herve.jourdain at neuf.fr>
AuthorDate: Wed May 18 20:33:37 2016 +0800

    mesa: fix mesa_populate_packages() when dri is disabled
    
    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
    
    [ use oe.path.join instead of + - RB ]
    
    Signed-off-by: Herve Jourdain <herve.jourdain at neuf.fr>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a4e5351..1d084c0 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -142,16 +142,17 @@ python mesa_populate_packages() {
         d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
 
     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)
+    dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri")
+    if os.path.isdir(dri_drivers_root):
+        dri_pkgs = os.listdir(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='')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list