From 819592454153657a953caed7cc380ebc031f49cc Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 15 Nov 2008 04:27:57 +0000 Subject: [PATCH] Bug #243022 - Inside dblink.mergeme(), when merging a directory and a symlink is in the way, verify that if points to a directory before accepting it, otherwise move it out of the way. svn path=/main/trunk/; revision=11920 --- pym/portage/dbapi/vartree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 38d1081a4..e78d32a6f 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3674,7 +3674,8 @@ class dblink(object): writemsg("!!! And finish by running this: env-update\n\n") return 1 - if stat.S_ISLNK(mydmode) or stat.S_ISDIR(mydmode): + if stat.S_ISDIR(mydmode) or \ + (stat.S_ISLNK(mydmode) and os.path.isdir(mydest)): # a symlink to an existing directory will work for us; keep it: showMessage("--- %s/\n" % mydest) if bsd_chflags: -- 2.26.2