summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-15 04:27:57 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-15 04:27:57 +0000
commit819592454153657a953caed7cc380ebc031f49cc (patch)
treefaba426836b2dce97ef7bb21c1ec97301ce5ffd7
parent1ccfda6c51ba4980e233baa8f3958fd05840a59a (diff)
downloadportage-819592454153657a953caed7cc380ebc031f49cc.tar.gz
portage-819592454153657a953caed7cc380ebc031f49cc.tar.bz2
portage-819592454153657a953caed7cc380ebc031f49cc.zip
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
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 2 insertions, 1 deletions
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: