From: Zac Medico Date: Sun, 5 Oct 2008 04:20:08 +0000 (-0000) Subject: Only update the confmem file when something has changed. X-Git-Tag: v2.2_rc12~31 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a9578ae9501b11b7e2161dbe2f72abdcf080f6b8;p=portage.git Only update the confmem file when something has changed. svn path=/main/trunk/; revision=11627 --- 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