From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RWAoa-0000NI-FO for garchives@archives.gentoo.org; Thu, 01 Dec 2011 17:52:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B06521C05D; Thu, 1 Dec 2011 17:52:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4079A21C05D for ; Thu, 1 Dec 2011 17:52:49 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BD7C61B4015 for ; Thu, 1 Dec 2011 17:52:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id F398E80044 for ; Thu, 1 Dec 2011 17:52:47 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/locks.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: af013a2de5a2dc7069de5e95c7474556cf9208ab Date: Thu, 1 Dec 2011 17:52:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: e4217d0f-4dfd-4a02-9ba7-fd49b33a4339 X-Archives-Hash: 939508e7d4b24f36eb43a600b6391632 commit: af013a2de5a2dc7069de5e95c7474556cf9208ab Author: Zac Medico gentoo org> AuthorDate: Thu Dec 1 17:52:23 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Dec 1 17:52:43 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Daf013a2d locks.py: use flock with PyPy for issue 747 --- pym/portage/locks.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 9ed1d6a..9cfb87e 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -8,6 +8,7 @@ __all__ =3D ["lockdir", "unlockdir", "lockfile", "unlockf= ile", \ =20 import errno import fcntl +import platform import stat import sys import time @@ -27,6 +28,10 @@ if sys.hexversion >=3D 0x3000000: HARDLINK_FD =3D -2 _default_lock_fn =3D fcntl.lockf =20 +if platform.python_implementation() =3D=3D 'PyPy': + # workaround for https://bugs.pypy.org/issue747 + _default_lock_fn =3D fcntl.flock + # Used by emerge in order to disable the "waiting for lock" message # so that it doesn't interfere with the status display. _quiet =3D False