summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2022-09-13 04:26:42 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-16 17:53:22 +0100
commitfe2c27108af37d653d1a06367d94084081ff9898 (patch)
treee05f16846ebbec812df4043d5ac4bd4c0a050d38 /bitbake
parent957522d50f515fba582a8919a35bd04f3c020a4e (diff)
downloadpoky-fe2c27108af37d653d1a06367d94084081ff9898.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: 280ea5a776436eab7e664fccea2df2e7ce47e586) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7236488b898309ec5f1880936ddae22a28ccf5d3) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 298017657a..e92d5feb2e 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -694,8 +694,8 @@ def remove(path, recurse=False, ionice=False):
694 return 694 return
695 if recurse: 695 if recurse:
696 for name in glob.glob(path): 696 for name in glob.glob(path):
697 if _check_unsafe_delete_path(path): 697 if _check_unsafe_delete_path(name):
698 raise Exception('bb.utils.remove: called with dangerous path "%s" and recurse=True, refusing to delete!' % path) 698 raise Exception('bb.utils.remove: called with dangerous path "%s" and recurse=True, refusing to delete!' % name)
699 # shutil.rmtree(name) would be ideal but its too slow 699 # shutil.rmtree(name) would be ideal but its too slow
700 cmd = [] 700 cmd = []
701 if ionice: 701 if ionice: