diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-05 04:20:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-05 04:20:08 +0000 |
commit | a9578ae9501b11b7e2161dbe2f72abdcf080f6b8 (patch) | |
tree | 22d75d0bbd7979dd9dd7160284f3bf1a2bcd5dff | |
parent | eda6f347a9ea526815e323493a82d5ceb8524233 (diff) | |
download | portage-a9578ae9501b11b7e2161dbe2f72abdcf080f6b8.tar.gz portage-a9578ae9501b11b7e2161dbe2f72abdcf080f6b8.tar.bz2 portage-a9578ae9501b11b7e2161dbe2f72abdcf080f6b8.zip |
Only update the confmem file when something has changed.
svn path=/main/trunk/; revision=11627
-rw-r--r-- | pym/portage/dbapi/vartree.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index b66bdb114..ac6e10ae3 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 |