diff options
-rwxr-xr-x | bin/ebuild.sh | 4 | ||||
-rw-r--r-- | pym/_emerge/AbstractEbuildProcess.py | 2 | ||||
-rw-r--r-- | pym/portage/package/ebuild/_ipc/QueryCommand.py | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 18f96b655..32cda5012 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -160,7 +160,7 @@ has_version() { 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 @@ -203,7 +203,7 @@ best_version() { 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 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 |