From: Richard Purdie Date: Tue, 7 Jun 2011 09:19:41 +0000 (+0800) Subject: lib/oe/util.py: Add MLPREFIX support to prune_suffix() X-Git-Tag: yocto-4.0~40252 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20dd241052afa5ff80b91ebf09b0b48765bc3412;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 5a63ed3c3b1..b3473d34762 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):