From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 975BD1382A1 for ; Fri, 4 Jan 2013 07:34:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03D0BE0665; Fri, 4 Jan 2013 07:34:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7594BE0665 for ; Fri, 4 Jan 2013 07:34:19 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8962F33D929 for ; Fri, 4 Jan 2013 07:34:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 247C3E5439 for ; Fri, 4 Jan 2013 07:34:17 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1357284845.60cfa786a1506e5fccfb02c3307c38399b5a532f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild-ipc.py X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 60cfa786a1506e5fccfb02c3307c38399b5a532f X-VCS-Branch: master Date: Fri, 4 Jan 2013 07:34:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e5fee23a-1c78-42d6-bd67-4e23d0a32b71 X-Archives-Hash: 636cc04d13fd974bf60343776a431c5c commit: 60cfa786a1506e5fccfb02c3307c38399b5a532f Author: Zac Medico gentoo org> AuthorDate: Fri Jan 4 07:34:05 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jan 4 07:34:05 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=60cfa786 ebuild-ipc: fix read timeout msg / daemon check It got disabled in commit 06d31ef00da24352a6614f20bccfc892d2120ed9. --- bin/ebuild-ipc.py | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py index ca707fa..4046d8d 100755 --- a/bin/ebuild-ipc.py +++ b/bin/ebuild-ipc.py @@ -145,12 +145,26 @@ class EbuildIpc(object): def _receive_reply(self, input_fd): - buf = None + start_time = time.time() pipe_reader = PipeReader(input_files={"input_fd":input_fd}, scheduler=global_event_loop()) pipe_reader.start() - pipe_reader.wait() + + eof = pipe_reader.poll() is not None + + while not eof: + pipe_reader._wait_loop(timeout=self._COMMUNICATE_RETRY_TIMEOUT_MS) + eof = pipe_reader.poll() is not None + if not eof: + if self._daemon_is_alive(): + self._timeout_retry_msg(start_time, + portage.localization._('during read')) + else: + pipe_reader.cancel() + self._no_daemon_msg() + return 2 + buf = pipe_reader.getvalue() retval = 2