summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-07 17:19:41 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-27 16:15:33 +0100
commit20dd241052afa5ff80b91ebf09b0b48765bc3412 (patch)
tree5376a37f820aed669a95e6775179319fb1119067 /meta/lib
parent5d9453049915db48ec4b5972e12287417ebb61a2 (diff)
downloadopenembedded-core-20dd241052afa5ff80b91ebf09b0b48765bc3412.tar.gz
openembedded-core-20dd241052afa5ff80b91ebf09b0b48765bc3412.tar.bz2
openembedded-core-20dd241052afa5ff80b91ebf09b0b48765bc3412.tar.xz
openembedded-core-20dd241052afa5ff80b91ebf09b0b48765bc3412.zip
lib/oe/util.py: Add MLPREFIX support to prune_suffix()
prune_suffix() also needs be aware of MLPREFIX when changing PN for use in BPN. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 5a63ed3c3..b3473d347 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):