mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 06:32:34 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
65b37734c7
commit
27cbc8c5f0
@@ -722,8 +722,8 @@ def prune_suffix(var, suffixes, d):
|
||||
# See if var ends with any of the suffixes listed and
|
||||
# remove it if found
|
||||
for suffix in suffixes:
|
||||
if var.endswith(suffix):
|
||||
return var.replace(suffix, "")
|
||||
if suffix and var.endswith(suffix):
|
||||
return var[:-len(suffix)]
|
||||
return var
|
||||
|
||||
def mkdirhier(directory):
|
||||
|
||||
Reference in New Issue
Block a user