From abf3368c778c9e615e5fa8acffcb2aa56fdd6a80 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 24 Jun 2009 03:18:01 +0000 Subject: Bug #275237 - If a directory exists in a location where a normal file is to be merged, generate a config-protect filename for the file and merge it that way. Thanks to Jonas Bernoulli for this patch. svn path=/main/trunk/; revision=13679 --- pym/portage/dbapi/vartree.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index c48a03149..139259177 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3825,7 +3825,7 @@ class dblink(object): # destination file exists if stat.S_ISDIR(mydmode): # install of destination is blocked by an existing directory with the same name - moveme = 0 + cfgprot = 1 showMessage("!!! %s\n" % mydest, level=logging.ERROR, noiselevel=-1) elif stat.S_ISREG(mydmode) or (stat.S_ISLNK(mydmode) and os.path.exists(mydest) and stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])): @@ -3860,8 +3860,8 @@ class dblink(object): """A previously remembered update has been accepted, so it is removed from confmem.""" del cfgfiledict[myrealdest] - if cfgprot: - mydest = new_protect_filename(mydest, newmd5=mymd5) + if cfgprot: + mydest = new_protect_filename(mydest, newmd5=mymd5) # whether config protection or not, we merge the new file the # same way. Unless moveme=0 (blocking directory) -- cgit v1.2.3-1-g7c22