Don't nest sandbox in emerge/repoman tests.
authorZac Medico <zmedico@gentoo.org>
Sun, 11 Dec 2011 21:00:28 +0000 (13:00 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 11 Dec 2011 21:00:28 +0000 (13:00 -0800)
pym/portage/tests/emerge/test_simple.py
pym/portage/tests/repoman/test_simple.py

index 5177229ac31b3ee43deb37809895c5c05a8acbd1..a3efa62ca482ca382687fbe03fcf3236da13a246 100644 (file)
@@ -267,7 +267,8 @@ pkg_preinst() {
                user_config_dir = os.path.join(os.sep, eprefix, USER_CONFIG_PATH)
 
                features = []
-               if not portage.process.sandbox_capable:
+               if not portage.process.sandbox_capable or \
+                       os.environ.get("SANDBOX_ON") == "1":
                        features.append("-sandbox")
 
                # Since egencache ignores settings from the calling environment,
index 3643ff2d763e937dfa4cfdb9d900079fbfa1ce14..eab06d9b8145c3f7a83538d99f1f5a4dc212503b 100644 (file)
@@ -196,6 +196,10 @@ class SimpleRepomanTestCase(TestCase):
                        "PYTHONPATH" : pythonpath,
                }
 
+               if os.environ.get("SANDBOX_ON") == "1":
+                       # avoid problems from nested sandbox instances
+                       env["FEATURES"] = "-sandbox"
+
                dirs = [homedir, license_dir, profiles_dir, distdir]
                try:
                        for d in dirs: