Also avoid sandbox violations in PreservedLibsRegistry.store(), for running
authorZac Medico <zmedico@gentoo.org>
Tue, 1 Jul 2008 08:29:41 +0000 (08:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 1 Jul 2008 08:29:41 +0000 (08:29 -0000)
portage inside ebuild phases.

svn path=/main/trunk/; revision=10866

pym/portage/dbapi/vartree.py

index 4ca0b9b1d3ce9dbe7388b2c5075406b5889161a0..1b13b8bc9a6f931e1b5e8573d468c6fca7eda697 100644 (file)
@@ -64,6 +64,8 @@ class PreservedLibsRegistry(object):
                """ Store the registry data to file. No need to call this if autocommit
                    was enabled.
                """
+               if os.environ.get("SANDBOX_ON") == "1":
+                       return
                try:
                        f = atomic_ofstream(self._filename)
                        cPickle.dump(self._data, f)