Patchwork [2/8] lib/oe/util.py: Add MLPREFIX support to prune_suffix()

login
register
mail settings
Submitter Richard Purdie
Date July 26, 2011, 9:53 p.m.
Message ID <bad4a41dd4824f4a158bcfc4e453cb0600d851d4.1311716946.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/8599/
State New, archived
Headers show

Comments

Richard Purdie - July 26, 2011, 9:53 p.m.
prune_suffix() also needs be aware of MLPREFIX when changing PN for
use in BPN.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/lib/oe/utils.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 5a63ed3..b3473d3 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -58,7 +58,12 @@  def prune_suffix(var, suffixes, d):
     # remove it if found
     for suffix in suffixes:
         if var.endswith(suffix):
-            return var.replace(suffix, "")
+            var = var.replace(suffix, "")
+
+    prefix = d.getVar("MLPREFIX", True)
+    if prefix and var.startswith(prefix):
+        var = var.replace(prefix, "")
+
     return var
 
 def str_filter(f, str, d):