summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-18 10:26:48 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-18 10:26:48 +0000
commitd02d2c89b71f2c8edc3197c1c38cad4e35053116 (patch)
tree4ed5b0e1de058c6509a5053c53bdcb7f31a113bf /pym/portage.py
parentca069e392d099d952a0888218c2ec53c0f31f28d (diff)
downloadportage-d02d2c89b71f2c8edc3197c1c38cad4e35053116.tar.gz
portage-d02d2c89b71f2c8edc3197c1c38cad4e35053116.tar.bz2
portage-d02d2c89b71f2c8edc3197c1c38cad4e35053116.zip
During unmerge, always verify that the file isn't a symlink before doing chmod. (trunk r6867)
svn path=/main/branches/2.1.2/; revision=6868
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 955901a52..bbbc6312b 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7228,7 +7228,8 @@ class dblink:
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