summaryrefslogtreecommitdiffstats
path: root/pym/portage_util.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-30 08:40:17 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-30 08:40:17 +0000
commitadd4ae8be75bd027f51977e601c9af8f1ddb27ee (patch)
tree559d864e21318502f1a426c78b3500b93aa72642 /pym/portage_util.py
parentff6fc5d72cf7f47330ca7abf06d9a3d04472f8c4 (diff)
downloadportage-add4ae8be75bd027f51977e601c9af8f1ddb27ee.tar.gz
portage-add4ae8be75bd027f51977e601c9af8f1ddb27ee.tar.bz2
portage-add4ae8be75bd027f51977e601c9af8f1ddb27ee.zip
Just use stat instead of lstat for config protect, so that broken symlinks are just ignored.
svn path=/main/trunk/; revision=4881
Diffstat (limited to 'pym/portage_util.py')
-rw-r--r--pym/portage_util.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py
index 0e6d53956..a0f8bc987 100644
--- a/pym/portage_util.py
+++ b/pym/portage_util.py
@@ -848,14 +848,9 @@ class ConfigProtect(object):
os.path.join(self.myroot, x.lstrip(os.path.sep)))
mystat = None
try:
- """Use lstat so that anything, even a broken symlink can be
- protected."""
- if stat.S_ISDIR(os.lstat(ppath).st_mode):
- self._dirs.add(ppath)
- self.protect.append(ppath)
- """Now use stat in case this is a symlink to a directory."""
if stat.S_ISDIR(os.stat(ppath).st_mode):
self._dirs.add(ppath)
+ self.protect.append(ppath)
except OSError:
# If it doesn't exist, there's no need to protect it.
pass