1 |
Author: zmedico |
2 |
Date: 2008-10-05 04:20:08 +0000 (Sun, 05 Oct 2008) |
3 |
New Revision: 11627 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/vartree.py |
7 |
Log: |
8 |
Only update the confmem file when something has changed. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/dbapi/vartree.py 2008-10-05 04:12:32 UTC (rev 11626) |
14 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2008-10-05 04:20:08 UTC (rev 11627) |
15 |
@@ -3055,6 +3055,7 @@ |
16 |
#if we have a file containing previously-merged config file md5sums, grab it. |
17 |
conf_mem_file = os.path.join(destroot, CONFIG_MEMORY_FILE) |
18 |
cfgfiledict = grabdict(conf_mem_file) |
19 |
+ cfgfiledict_orig = cfgfiledict.copy() |
20 |
if "NOCONFMEM" in self.settings: |
21 |
cfgfiledict["IGNORE"]=1 |
22 |
else: |
23 |
@@ -3115,9 +3116,10 @@ |
24 |
|
25 |
# write out our collection of md5sums |
26 |
cfgfiledict.pop("IGNORE", None) |
27 |
- ensure_dirs(os.path.dirname(conf_mem_file), |
28 |
- gid=portage_gid, mode=02750, mask=02) |
29 |
- writedict(cfgfiledict, conf_mem_file) |
30 |
+ if cfgfiledict != cfgfiledict_orig: |
31 |
+ ensure_dirs(os.path.dirname(conf_mem_file), |
32 |
+ gid=portage_gid, mode=02750, mask=02) |
33 |
+ writedict(cfgfiledict, conf_mem_file) |
34 |
|
35 |
# These caches are populated during collision-protect and the data |
36 |
# they contain is now invalid. It's very important to invalidate |