From 22e9978f6b07d0b4183b3b330c13f2a8ec8db11b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 15 Nov 2008 04:28:56 +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. (trunk r11920) svn path=/main/branches/2.1.6/; revision=11921 --- 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 31ad8880c..2555657ba 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -2641,7 +2641,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