summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorAndre Rosa <andre.rosa@lge.com>2019-04-06 01:29:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-09 13:45:15 +0100
commit27cbc8c5f07c46b462135b9542cdf46ab667bf36 (patch)
tree0d434eff37ffd01f5a878343e21b3d63b928fb5a /bitbake/lib/bb/utils.py
parent65b37734c7350443957dcb7d8f299d384d5aaa8c (diff)
downloadpoky-27cbc8c5f07c46b462135b9542cdf46ab667bf36.tar.gz
bitbake: utils: Make prune_suffix prune a suffix
Make prune_suffix prune a suffix instead of replacing a substring that could happen more than once and not only when it ends with it. (Bitbake rev: 57e765e38c6382a9b36d5ee2a6f3fa96ac905b82) Signed-off-by: Andre Rosa <andre.rosa@lge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index b652a6838a..d186b1fa27 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -722,8 +722,8 @@ def prune_suffix(var, suffixes, d):
722 # See if var ends with any of the suffixes listed and 722 # See if var ends with any of the suffixes listed and
723 # remove it if found 723 # remove it if found
724 for suffix in suffixes: 724 for suffix in suffixes:
725 if var.endswith(suffix): 725 if suffix and var.endswith(suffix):
726 return var.replace(suffix, "") 726 return var[:-len(suffix)]
727 return var 727 return var
728 728
729def mkdirhier(directory): 729def mkdirhier(directory):