diff options
author | Richard Purdie <richard@openedhand.com> | 2008-10-20 14:19:36 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-10-20 14:19:36 +0000 |
commit | c53608b220a8b5acb2ba867cfdba10c2ede479a6 (patch) | |
tree | 56ba501bc65e2e5d9f1173b178278fc8d0fdb90d | |
parent | 8bb2cd79631e78a51ed8c062f8a104b6c6edecd9 (diff) | |
download | openembedded-core-c53608b220a8b5acb2ba867cfdba10c2ede479a6.tar.gz openembedded-core-c53608b220a8b5acb2ba867cfdba10c2ede479a6.tar.bz2 openembedded-core-c53608b220a8b5acb2ba867cfdba10c2ede479a6.zip |
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
-rw-r--r-- | bitbake-dev/lib/bb/utils.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/utils.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bitbake-dev/lib/bb/utils.py b/bitbake-dev/lib/bb/utils.py index ad1a515292..33a0c17650 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 9641b988ab..cc3d03f609 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) |