diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2008-10-08 01:48:01 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2008-10-08 01:48:01 +0000 |
commit | 24b23417acc0d34a7dbcd6fe1d05aad87d46abe3 (patch) | |
tree | c7497aca555e401e700783c2288ac1d8f7e28cad | |
parent | 7a6dd971812c57b06c8d6dc40cd89df3839de5d3 (diff) | |
download | bitbake-24b23417acc0d34a7dbcd6fe1d05aad87d46abe3.tar.gz |
[bb.utils] Make prunedir cope with symlinks to directories
2008-10-07 Julian Chu <Julian_Chu@openmoko.com>
Reviewed by Holger.
The packagekit git repository contains a symlink and on fetching the
pruning failed as "packagekit" is not a directory but a symlink to a
directory.
* lib/bb/utils.py:
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/bb/utils.py | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -155,6 +155,7 @@ Changes in Bitbake 1.9.x: used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used to extend the internal whitelist. - Perforce fetcher fix to use commandline options instead of being overriden by the environment + - bb.utils.prunedir can cope with symlinks to directoriees without exceptions Changes in Bitbake 1.8.0: - Release 1.7.x as a stable series diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 2520c252e..904884550 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -357,5 +357,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) |