summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 64c2eecbd..5bc2f22d8 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7189,7 +7189,8 @@ class dblink:
writemsg_stdout("--- !md5 %s %s\n" % ("obj", obj))
continue
try:
- if statobj.st_mode & (stat.S_ISUID | stat.S_ISGID):
+ if not islink and \
+ statobj.st_mode & (stat.S_ISUID | stat.S_ISGID):
# Always blind chmod 0 before unlinking to avoid race conditions.
os.chmod(obj, 0000)
if statobj.st_nlink > 1: