summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa.inc
diff options
context:
space:
mode:
authorHerve Jourdain <herve.jourdain@neuf.fr>2016-05-18 20:33:37 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 10:20:55 +0100
commit599933cfe19dbe746ec0fd8be976a1682d5aef82 (patch)
treec9882d273ecec5c262a0aadb269318656501c7db /meta/recipes-graphics/mesa/mesa.inc
parent70b0e62af991089b6c0b2218512240940ca80f3e (diff)
downloadpoky-599933cfe19dbe746ec0fd8be976a1682d5aef82.tar.gz
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 ] (From OE-Core rev: 7e96806d1282865761fcc047abcb72970279d82d) Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc21
1 files changed, 11 insertions, 10 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a4e53516f3..1d084c0b85 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -142,16 +142,17 @@ python mesa_populate_packages() {
142 d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) 142 d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
143 143
144 import re 144 import re
145 dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri") 145 dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri")
146 dri_pkgs = os.listdir(d.getVar('PKGD', True) + dri_drivers_root) 146 if os.path.isdir(dri_drivers_root):
147 lib_name = d.expand("${MLPREFIX}mesa-megadriver") 147 dri_pkgs = os.listdir(dri_drivers_root)
148 for p in dri_pkgs: 148 lib_name = d.expand("${MLPREFIX}mesa-megadriver")
149 m = re.match('^(.*)_dri\.so$', p) 149 for p in dri_pkgs:
150 if m: 150 m = re.match('^(.*)_dri\.so$', p)
151 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) 151 if m:
152 d.appendVar("RPROVIDES_%s" % lib_name, pkg_name) 152 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
153 d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name) 153 d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
154 d.appendVar("RREPLACES_%s" % lib_name, pkg_name) 154 d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
155 d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
155 156
156 pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe") 157 pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe")
157 do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') 158 do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')