diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-05 04:12:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-05 04:12:32 +0000 |
commit | eda6f347a9ea526815e323493a82d5ceb8524233 (patch) | |
tree | 14f5d2ced1e3ec23e5170d83410286c52049bc04 | |
parent | 6550a2598c2f1ca01bd90d27c1d991509331e0da (diff) | |
download | portage-eda6f347a9ea526815e323493a82d5ceb8524233.tar.gz portage-eda6f347a9ea526815e323493a82d5ceb8524233.tar.bz2 portage-eda6f347a9ea526815e323493a82d5ceb8524233.zip |
Fix PreservedLibsRegistry.store() so that it only rewrites the data file when
something has changed.
svn path=/main/trunk/; revision=11626
-rw-r--r-- | pym/portage/dbapi/vartree.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index becbacc17..b66bdb114 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -65,12 +65,13 @@ class PreservedLibsRegistry(object): raise PermissionDenied(self._filename) else: raise e - + self._data_orig = self._data.copy() def store(self): """ Store the registry data to file. No need to call this if autocommit was enabled. """ - if os.environ.get("SANDBOX_ON") == "1": + if os.environ.get("SANDBOX_ON") == "1" or \ + self._data == self._data_orig: return try: f = atomic_ofstream(self._filename) |