From 8cfe2dc28e02a9cdd739a83db4ed871a31468114 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 15 Mar 2013 22:39:38 -0700 Subject: [PATCH] Use lexists for symlink target checks. --- pym/portage/dbapi/vartree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)]) -- 2.26.2