summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2022-07-19 10:39:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-28 11:55:06 +0100
commit895779fd7e7c1841603046f838b8b89d85c6f4f8 (patch)
tree88325c571efe1c10a89e14d42712b1e84041e18a /bitbake/lib/bb/utils.py
parente1a2b1d1b3c1094543f97abf6327cff36f5028f8 (diff)
downloadpoky-895779fd7e7c1841603046f838b8b89d85c6f4f8.tar.gz
bitbake: bb/utils: remove: check the path again the expand python glob
When we call the remove with recurse=True we first check if the remove operation is safe in _check_unsafe_delete_path. But the check is been done on the path instaed of the expanded python glog. (Bitbake rev: 7236488b898309ec5f1880936ddae22a28ccf5d3) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.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 d11da978d7..512cc4eb76 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -692,8 +692,8 @@ def remove(path, recurse=False, ionice=False):
692 return 692 return
693 if recurse: 693 if recurse:
694 for name in glob.glob(path): 694 for name in glob.glob(path):
695 if _check_unsafe_delete_path(path): 695 if _check_unsafe_delete_path(name):
696 raise Exception('bb.utils.remove: called with dangerous path "%s" and recurse=True, refusing to delete!' % path) 696 raise Exception('bb.utils.remove: called with dangerous path "%s" and recurse=True, refusing to delete!' % name)
697 # shutil.rmtree(name) would be ideal but its too slow 697 # shutil.rmtree(name) would be ideal but its too slow
698 cmd = [] 698 cmd = []
699 if ionice: 699 if ionice: