For bug #182157, never chmod 0 symlinks before unlinking them. (trunk r6848)
authorZac Medico <zmedico@gentoo.org>
Fri, 15 Jun 2007 20:14:05 +0000 (20:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 15 Jun 2007 20:14:05 +0000 (20:14 -0000)
svn path=/main/branches/2.1.2/; revision=6849

pym/portage.py

index 54eb19a13f20b4ee4e24c1c90c1026a544b54f3f..88bc3816c250bb25b636b53eb16ef1c603b42e4b 100644 (file)
@@ -7164,7 +7164,7 @@ class dblink:
                                        try:
                                                # Remove permissions to ensure that any hardlinks to
                                                # suid/sgid files are rendered harmless.
-                                               if statobj:
+                                               if statobj and not islink:
                                                        os.chmod(obj, 0)
                                                os.unlink(obj)
                                        except EnvironmentError, e: