bitbake utils.py: Merge prunedir symlink fix from bitbake upstream

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5551 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2008-10-20 14:19:36 +00:00
parent 8bb2cd7963
commit c53608b220
2 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -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)