Patchwork [1/2] mesa.inc: add MLPREFIX in RPROVIDES/RREPLACES/RCONFLICTS processing

login
register
mail settings
Submitter Ming Liu
Date June 20, 2014, 10:28 a.m.
Message ID <1403260081-669-1-git-send-email-ming.liu@windriver.com>
Download mbox | patch
Permalink /patch/74161/
State New
Headers show

Comments

Ming Liu - June 20, 2014, 10:28 a.m.
It also avoids following QA warnings:
......
WARNING: Multilib QA Issue: lib32-mesa package lib32-mesa-megadriver -
suspicious values 'mesa-driver-nouveau-vieux mesa-driver-r200
mesa-driver-i965 mesa-driver-radeon mesa-driver-swrast mesa-driver-i915'
in RPROVIDES
WARNING: Multilib QA Issue: lib32-mesa package lib32-mesa-megadriver -
suspicious values 'mesa-driver-nouveau-vieux mesa-driver-r200
mesa-driver-i965 mesa-driver-radeon mesa-driver-swrast mesa-driver-i915'
in RREPLACES
WARNING: Multilib QA Issue: lib32-mesa package lib32-mesa-megadriver -
suspicious values 'mesa-driver-nouveau-vieux mesa-driver-r200
mesa-driver-i965 mesa-driver-radeon mesa-driver-swrast mesa-driver-i915'
in RCONFLICTS

Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 453510a..ad3b741 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -105,6 +105,7 @@  do_install_append () {
 # they don't get Debian-renamed (which would remove the -mesa suffix), and
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
+    ml = d.getVar('MLPREFIX', True)
     pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
     for p in (("egl", "libegl", "libegl1"),
               ("dri", "libgl", "libgl1"),
@@ -113,8 +114,8 @@  python __anonymous() {
               ("gles", "libgles3",)):
         if not p[0] in pkgconfig:
             continue
-        fullp = p[1] + "-mesa"
-        pkgs = " ".join(p[1:])
+        fullp = ml + p[1] + "-mesa"
+        pkgs = ml + (" " + ml).join(p[1:])
         d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
         d.appendVar("RREPLACES_" + fullp, pkgs)
         d.appendVar("RPROVIDES_" + fullp, pkgs)
@@ -122,15 +123,16 @@  python __anonymous() {
         
         # For -dev, the first element is both the Debian and original name
         fullp += "-dev"
-        pkgs = p[1] + "-dev"
+        pkgs = ml + p[1] + "-dev"
         d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
         d.appendVar("RREPLACES_" + fullp, pkgs)
         d.appendVar("RPROVIDES_" + fullp, pkgs)
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-python mesa_populate_packages() {
-    pkgs = ['mesa', 'mesa-dev', 'mesa-dbg']
+python mesa_populate_packages() { 
+    ml = d.getVar('MLPREFIX', True)
+    pkgs = [ml + 'mesa', ml + 'mesa-dev', ml + 'mesa-dbg']
     for pkg in pkgs:
         d.setVar("RPROVIDES_%s" % pkg, pkg.replace("mesa-", "mesa-dri-"))
         d.setVar("RCONFLICTS_%s" % pkg, pkg.replace("mesa-", "mesa-dri-"))
@@ -139,11 +141,11 @@  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")
+    lib_name = ml + 'mesa-megadriver'
     for p in dri_pkgs:
         m = re.match('^(.*)_dri\.so$', p)
         if m:
-            pkg_name = " mesa-driver-%s" % legitimize_package_name(m.group(1))
+            pkg_name = " %smesa-driver-%s" % (ml, 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)