Enable EbuildIpcDaemon support by default.
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 03:59:26 +0000 (20:59 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 03:59:26 +0000 (20:59 -0700)
pym/_emerge/AbstractEbuildProcess.py
pym/portage/tests/ebuild/test_doebuild_spawn.py

index e2be8b856291437a04082645a9f33ae11ae0913a..aca254191974668a8e3409a641c1edda4469de77 100644 (file)
@@ -25,6 +25,10 @@ class AbstractEbuildProcess(SpawnProcess):
                ('_ipc_daemon', '_exit_command',)
        _phases_without_builddir = ('clean', 'cleanrm', 'depend', 'help',)
 
+       # The EbuildIpcDaemon support is well tested, but this variable
+       # is left so we can temporarily disable it if any issues arise.
+       _enable_ipc_daemon = True
+
        def __init__(self, **kwargs):
                SpawnProcess.__init__(self, **kwargs)
                if self.phase is None:
@@ -40,10 +44,7 @@ class AbstractEbuildProcess(SpawnProcess):
                        # since we're not displaying to a terminal anyway.
                        self.settings['NOCOLOR'] = 'true'
 
-               enable_ipc_daemon = \
-                       self.settings.get('PORTAGE_IPC_DAEMON_ENABLE') == '1'
-
-               if enable_ipc_daemon:
+               if self._enable_ipc_daemon:
                        self.settings.pop('PORTAGE_EBUILD_EXIT_FILE', None)
                        if self.phase not in self._phases_without_builddir:
                                self.settings['PORTAGE_IPC_DAEMON'] = "1"
index 615062709923bde9f8460d20655e0c46eadee424..842bb45f053a45ae4764f04ae336adf1252aa69f 100644 (file)
@@ -48,15 +48,10 @@ class DoebuildSpawnTestCase(TestCase):
                        # Create a fake environment, to pretend as if the ebuild
                        # has been sourced already.
                        open(os.path.join(settings['T'], 'environment'), 'wb')
-                       for enable_ipc in (False, True):
-                               if enable_ipc:
-                                       settings['PORTAGE_IPC_DAEMON_ENABLE'] = '1'
-                               else:
-                                       settings.pop('PORTAGE_IPC_DAEMON_ENABLE', None)
-                               for phase in ('_internal_test',):
-                                       rval = doebuild_spawn(
-                                               "%s %s" % (_shell_quote(EBUILD_SH_BINARY), phase),
-                                               settings, free=1)
-                                       self.assertEqual(rval, os.EX_OK)
+                       for phase in ('_internal_test',):
+                               rval = doebuild_spawn(
+                                       "%s %s" % (_shell_quote(EBUILD_SH_BINARY), phase),
+                                       settings, free=1)
+                               self.assertEqual(rval, os.EX_OK)
                finally:
                        playground.cleanup()