From: Zac Medico Date: Sat, 16 Mar 2013 05:39:38 +0000 (-0700) Subject: Use lexists for symlink target checks. X-Git-Tag: v2.2.0_alpha167~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8cfe2dc28e02a9cdd739a83db4ed871a31468114;p=portage.git Use lexists for symlink target checks. --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 95b67dd37..d011c33b3 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -4484,7 +4484,10 @@ class dblink(object): pass if mymtime != None: - if not os.path.exists(myrealto) and not os.path.exists(join(srcroot, myabsto)): + # Use lexists, since if the target happens to be a broken + # symlink then that should trigger an independent warning. + if not (os.path.lexists(myrealto) or + os.path.lexists(join(srcroot, myabsto))): self._eqawarn('preinst', [_("QA Notice: Symbolic link /%s points to /%s which does not exist.") % (relative_path, myabsto)])