summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-19 14:31:52 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-19 14:33:05 -0800
commitc78cc0556feb66fc345bd8de5ddb8e3c2e50d54d (patch)
tree5db7f21a33e04eaf3ceea806ef0d57aac60b2818 /bitbake/lib
parent72ebe0c34f38f462ac193ff2a5a52e03f5f214fb (diff)
downloadpoky-c78cc0556feb66fc345bd8de5ddb8e3c2e50d54d.tar.gz
bitbake: utils: Improve remove funciton to handle whitespace
Improve the remove function to better handle cases where path contains special shell chars like whitespaces, '$', ';' or'\'. Thanks to Enrico Scholz for the fix. (Bitbake rev: 617511c9f86cc4ef52457653c8adff582d94bce3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-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 8c363dfe20..b2f81c8a92 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -536,9 +536,9 @@ def remove(path, recurse=False):
536 if not path: 536 if not path:
537 return 537 return
538 if recurse: 538 if recurse:
539 import subprocess 539 import subprocess, glob
540 # shutil.rmtree(name) would be ideal but its too slow 540 # shutil.rmtree(name) would be ideal but its too slow
541 subprocess.call("rm -rf %s" % path, shell=True) 541 subprocess.call(['rm', '-rf'] + glob.glob(path))
542 return 542 return
543 import os, errno, glob 543 import os, errno, glob
544 for name in glob.glob(path): 544 for name in glob.glob(path):