fi
if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
- "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "$ROOT" "$1" "$USE"
+ "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "$ROOT" "$1"
return $?
fi
fi
if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
- "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "$ROOT" "$1" "$USE"
+ "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "$ROOT" "$1"
return $?
fi
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,
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