diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-01 09:52:23 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-01 09:52:43 -0800 |
commit | af013a2de5a2dc7069de5e95c7474556cf9208ab (patch) | |
tree | 06a174e1a7b1cbf7dacfdc9aee51d4e5b09ad28c | |
parent | 3da4b9c384502092bf7f0fcdf47ce497907544dc (diff) | |
download | portage-af013a2de5a2dc7069de5e95c7474556cf9208ab.tar.gz portage-af013a2de5a2dc7069de5e95c7474556cf9208ab.tar.bz2 portage-af013a2de5a2dc7069de5e95c7474556cf9208ab.zip |
locks.py: use flock with PyPy for issue 747
-rw-r--r-- | 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 9ed1d6a6c..9cfb87e2d 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -8,6 +8,7 @@ __all__ = ["lockdir", "unlockdir", "lockfile", "unlockfile", \ import errno import fcntl +import platform import stat import sys import time @@ -27,6 +28,10 @@ if sys.hexversion >= 0x3000000: HARDLINK_FD = -2 _default_lock_fn = fcntl.lockf +if platform.python_implementation() == 'PyPy': + # workaround for https://bugs.pypy.org/issue747 + _default_lock_fn = 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 = False |