summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-24 03:18:01 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-24 03:18:01 +0000
commitabf3368c778c9e615e5fa8acffcb2aa56fdd6a80 (patch)
treec0c811143408b5c4069b6f9f4b91ece7fe523e30
parent12c879a68914db736c8193ccba1d52216e086b3c (diff)
downloadportage-abf3368c778c9e615e5fa8acffcb2aa56fdd6a80.tar.gz
portage-abf3368c778c9e615e5fa8acffcb2aa56fdd6a80.tar.bz2
portage-abf3368c778c9e615e5fa8acffcb2aa56fdd6a80.zip
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 <jonas@bernoulli.cc> for this patch. svn path=/main/trunk/; revision=13679
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files 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)