summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-05 04:20:08 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-05 04:20:08 +0000
commita9578ae9501b11b7e2161dbe2f72abdcf080f6b8 (patch)
tree22d75d0bbd7979dd9dd7160284f3bf1a2bcd5dff
parentFix PreservedLibsRegistry.store() so that it only rewrites the data file when (diff)
downloadportage-multirepo-a9578ae9501b11b7e2161dbe2f72abdcf080f6b8.tar.gz
portage-multirepo-a9578ae9501b11b7e2161dbe2f72abdcf080f6b8.tar.bz2
portage-multirepo-a9578ae9501b11b7e2161dbe2f72abdcf080f6b8.zip
Only update the confmem file when something has changed.
svn path=/main/trunk/; revision=11627
-rw-r--r--pym/portage/dbapi/vartree.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index b66bdb11..ac6e10ae 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3055,6 +3055,7 @@ class dblink(object):
#if we have a file containing previously-merged config file md5sums, grab it.
conf_mem_file = os.path.join(destroot, CONFIG_MEMORY_FILE)
cfgfiledict = grabdict(conf_mem_file)
+ cfgfiledict_orig = cfgfiledict.copy()
if "NOCONFMEM" in self.settings:
cfgfiledict["IGNORE"]=1
else:
@@ -3115,9 +3116,10 @@ class dblink(object):
# write out our collection of md5sums
cfgfiledict.pop("IGNORE", None)
- ensure_dirs(os.path.dirname(conf_mem_file),
- gid=portage_gid, mode=02750, mask=02)
- writedict(cfgfiledict, conf_mem_file)
+ if cfgfiledict != cfgfiledict_orig:
+ ensure_dirs(os.path.dirname(conf_mem_file),
+ gid=portage_gid, mode=02750, mask=02)
+ writedict(cfgfiledict, conf_mem_file)
# These caches are populated during collision-protect and the data
# they contain is now invalid. It's very important to invalidate