From: Zac Medico Date: Sat, 15 Nov 2008 04:28:56 +0000 (-0000) Subject: Bug #243022 - Inside dblink.mergeme(), when merging a directory and a symlink X-Git-Tag: v2.1.6_rc1~68 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=22e9978f6b07d0b4183b3b330c13f2a8ec8db11b;p=portage.git 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 --- 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: