summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-18 10:26:17 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-18 10:26:17 +0000
commitb5c438044c24e07602c482e3f03eac9507387377 (patch)
tree07c2c2a0e66687be6f21efb2c91197d0df03f0b0
parent6b2ce92454d61576b9821b979d13c977d59fab36 (diff)
downloadportage-b5c438044c24e07602c482e3f03eac9507387377.tar.gz
portage-b5c438044c24e07602c482e3f03eac9507387377.tar.bz2
portage-b5c438044c24e07602c482e3f03eac9507387377.zip
During unmerge, always verify that the file isn't a symlink before doing chmod.
svn path=/main/trunk/; revision=6867
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index dcc673c79..68545a53b 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1263,7 +1263,8 @@ class dblink(object):
try:
# Remove permissions to ensure that any hardlinks to
# suid/sgid files are rendered harmless.
- os.chmod(obj, 0)
+ if not islink:
+ os.chmod(obj, 0)
os.unlink(obj)
except (OSError, IOError), e:
pass