1 |
Author: zmedico |
2 |
Date: 2009-06-24 03:18:01 +0000 (Wed, 24 Jun 2009) |
3 |
New Revision: 13679 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/vartree.py |
7 |
Log: |
8 |
Bug #275237 - If a directory exists in a location where a normal file is to |
9 |
be merged, generate a config-protect filename for the file and merge it that |
10 |
way. Thanks to Jonas Bernoulli <jonas@×××××××××.cc> for this patch. |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/portage/dbapi/vartree.py 2009-06-23 21:25:19 UTC (rev 13678) |
16 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2009-06-24 03:18:01 UTC (rev 13679) |
17 |
@@ -3825,7 +3825,7 @@ |
18 |
# destination file exists |
19 |
if stat.S_ISDIR(mydmode): |
20 |
# install of destination is blocked by an existing directory with the same name |
21 |
- moveme = 0 |
22 |
+ cfgprot = 1 |
23 |
showMessage("!!! %s\n" % mydest, |
24 |
level=logging.ERROR, noiselevel=-1) |
25 |
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])): |
26 |
@@ -3860,8 +3860,8 @@ |
27 |
"""A previously remembered update has been |
28 |
accepted, so it is removed from confmem.""" |
29 |
del cfgfiledict[myrealdest] |
30 |
- if cfgprot: |
31 |
- mydest = new_protect_filename(mydest, newmd5=mymd5) |
32 |
+ if cfgprot: |
33 |
+ mydest = new_protect_filename(mydest, newmd5=mymd5) |
34 |
|
35 |
# whether config protection or not, we merge the new file the |
36 |
# same way. Unless moveme=0 (blocking directory) |