During unmerge, always verify that the file isn't a symlink before doing chmod. ...
authorZac Medico <zmedico@gentoo.org>
Mon, 18 Jun 2007 10:26:48 +0000 (10:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 18 Jun 2007 10:26:48 +0000 (10:26 -0000)
svn path=/main/branches/2.1.2/; revision=6868

pym/portage.py

index 955901a52f32270adecff88c5ba8c7a317301f72..bbbc6312b3d972d1c16dc66f97d33c515fd706ab 100644 (file)
@@ -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