diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/_emerge/AbstractEbuildProcess.py | 2 | ||||
-rw-r--r-- | pym/portage/package/ebuild/_ipc/QueryCommand.py | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py index 416babcfb..21fd88038 100644 --- a/pym/_emerge/AbstractEbuildProcess.py +++ b/pym/_emerge/AbstractEbuildProcess.py @@ -41,7 +41,7 @@ class AbstractEbuildProcess(SpawnProcess): self.settings['PORTAGE_BUILDDIR'], '.ipc_in') output_fifo = os.path.join( self.settings['PORTAGE_BUILDDIR'], '.ipc_out') - query_command = QueryCommand() + query_command = QueryCommand(self.settings) commands = { 'best_version' : query_command, 'exit' : self._exit_command, diff --git a/pym/portage/package/ebuild/_ipc/QueryCommand.py b/pym/portage/package/ebuild/_ipc/QueryCommand.py index 684837456..47095cb4c 100644 --- a/pym/portage/package/ebuild/_ipc/QueryCommand.py +++ b/pym/portage/package/ebuild/_ipc/QueryCommand.py @@ -11,25 +11,26 @@ from portage.versions import best class QueryCommand(IpcCommand): - __slots__ = () + __slots__ = ('settings',) _db = None - def __init__(self): + def __init__(self, settings): IpcCommand.__init__(self) + self.settings = settings def __call__(self, argv): """ @returns: tuple of (stdout, stderr, returncode) """ - cmd, root, atom, use = argv + cmd, root, atom = argv try: atom = Atom(atom) except InvalidAtom: return ('', 'invalid atom: %s\n' % atom, 2) - use = frozenset(use.split()) + use = frozenset(self.settings['PORTAGE_USE'].split()) atom = atom.evaluate_conditionals(use) db = self._db |