When scanning for config updates, treat a symlink to an existing
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Sep 2007 20:16:48 +0000 (20:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Sep 2007 20:16:48 +0000 (20:16 -0000)
directory as if it's just a normal directory. (trunk r7873)

svn path=/main/branches/2.1.2/; revision=7874

bin/emerge

index 94aa6b0a18f9c31eb332737856f6d5a2a5d13fcb..7dc67c8c5c305ccae59fe54ee802a3e8f8d24cf7 100755 (executable)
@@ -4523,6 +4523,15 @@ def chk_updated_cfg_files(target_root, config_protect):
                                mymode = os.lstat(x).st_mode
                        except OSError:
                                continue
+                       if stat.S_ISLNK(mymode):
+                               # We want to treat it like a directory if it
+                               # is a symlink to an existing directory.
+                               try:
+                                       real_mode = os.stat(x).st_mode
+                                       if stat.S_ISDIR(real_mode):
+                                               mymode = real_mode
+                               except OSError:
+                                       pass
                        if stat.S_ISDIR(mymode):
                                mycommand = "find '%s' -iname '._cfg????_*'" % x
                        else: