aboutsummaryrefslogtreecommitdiff
blob: 333ad7bd0aaa07fcfef7d4a8a671df77460b3a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

from _emerge.AbstractEbuildProcess import AbstractEbuildProcess
import portage
portage.proxy.lazyimport.lazyimport(globals(),
	'portage.package.ebuild.doebuild:_doebuild_spawn,_spawn_actionmap'
)

class EbuildProcess(AbstractEbuildProcess):

	__slots__ = ('actionmap',)

	def _spawn(self, args, **kwargs):

		actionmap = self.actionmap
		if actionmap is None:
			actionmap = _spawn_actionmap(self.settings)

		if self._dummy_pipe_fd is not None:
			self.settings["PORTAGE_PIPE_FD"] = str(self._dummy_pipe_fd)

		try:
			return _doebuild_spawn(self.phase, self.settings,
					actionmap=actionmap, **kwargs)
		finally:
			self.settings.pop("PORTAGE_PIPE_FD", None)