summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbake-dev/lib/bb/utils.py5
-rw-r--r--bitbake/lib/bb/utils.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/bitbake-dev/lib/bb/utils.py b/bitbake-dev/lib/bb/utils.py
index ad1a51529..33a0c1765 100644
--- a/bitbake-dev/lib/bb/utils.py
+++ b/bitbake-dev/lib/bb/utils.py
@@ -389,5 +389,8 @@ def prunedir(topdir):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
- os.rmdir(os.path.join(root, name))
+ if os.path.islink(os.path.join(root, name)):
+ os.remove(os.path.join(root, name))
+ else:
+ os.rmdir(os.path.join(root, name))
os.rmdir(topdir)
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 9641b988a..cc3d03f60 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -389,6 +389,9 @@ def prunedir(topdir):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
- os.rmdir(os.path.join(root, name))
+ if os.path.islink(os.path.join(root, name)):
+ os.remove(os.path.join(root, name))
+ else:
+ os.rmdir(os.path.join(root, name))
os.rmdir(topdir)