summaryrefslogtreecommitdiffstats
path: root/pym/portage/locks.py
Commit message (Collapse)AuthorAgeFilesLines
* Enable FD_CLOEXEC for lock fd.Zac Medico2013-01-031-1/+10
|
* locks.py: fix _close_fds docstringv2.2.0_alpha96Zac Medico2012-03-271-1/+0
|
* Close fewer file descriptors for fork / no exec.Zac Medico2012-03-271-1/+22
| | | | This will fix bug #374335.
* Fix a typo in a comment.v2.2.0_alpha81Arfrever Frehtes Taifersar Arahesis2011-12-141-1/+1
|
* hardlink_lockfile: preserve existing permissionsZac Medico2011-12-141-2/+6
|
* lockfile: deprecate file object or fd parametersZac Medico2011-12-131-1/+11
| | | | | | | Support for file object or integer file descriptor parameters is deprecated due to ambiguity in whether or not it's safe to close the file descriptor, making it prone to "Bad file descriptor" errors or file descriptor leaks.
* hardlink_lockfile: optimize away most link callsZac Medico2011-12-131-30/+41
| | | | | | If fstat shows more than one hardlink, then it's extremely unlikely that the following link call will result in a lock, so optimize away the wasteful link call and sleep or raise TryAgain.
* hardlink_is_mine: return False, never NoneZac Medico2011-12-131-1/+2
|
* locks.py: fix hardlink locks for bug #394195Zac Medico2011-12-131-55/+126
| | | | | | This updates the hardlink locking code to support the non-blocking, lockfile(wantnewlockfile=False), and lockfile(file_object) behaviors which are used by portage code.
* locks.py: make hardlink lock files hiddenZac Medico2011-12-131-4/+6
| | | | | This is for consistency with the behavior for normal lock files, since commit ce44ea3e914098a52bc0d1d995e71661659e77ca (bug #142369).
* locks.py: use flock with PyPy for issue 747Zac Medico2011-12-011-0/+5
|
* lockfile: use hasattr() instead of dir()Zac Medico2011-06-091-1/+1
|
* locks: use a private constant for fcntl.lockfZac Medico2011-06-091-3/+4
|
* Fix lockfile() to close the file descriptor before raising TryAgain.Zac Medico2010-09-181-0/+1
|
* Bug #336142 - Add support for using a thread to wait for locks insideZac Medico2010-09-131-2/+2
| | | | | dblink.lockdb() so that the scheduler can concurrently service ipc calls in the main thread.
* Add missing portage import in portage.locks.Zac Medico2010-09-031-0/+1
|
* Make portage.locks avoid importing the portage.output module when inZac Medico2010-09-031-6/+10
| | | | | quiet mode. This is one less import triggered by ebuild-ipc.py, which should be as lightweight as possible.
* Move portage.locks imports to the top of the file.Zac Medico2010-09-031-4/+4
|
* Ensure SystemExit is never caught.Zac Medico2010-08-261-0/+2
|
* Add some more info to the 'Cannot chown a lockfile' message, sinceZac Medico2010-08-151-1/+5
| | | | it's being triggered on the buildbot.
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Show the path of the lockfile when chown fails. Thanks to Jeremy OlexaZac Medico2010-01-291-2/+2
| | | | | | <darkside@g.o> for reporting. svn path=/main/trunk/; revision=15220
* Define basestring as str when Python 3 is used.Arfrever Frehtes Taifersar Arahesis2009-09-211-0/+4
| | | | svn path=/main/trunk/; revision=14316
* Update syntax of numbers for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-3/+3
| | | | | | (2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-6/+6
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Use portage.os, _content_encoding, and _fs_encoding where appropriate.Zac Medico2009-08-171-1/+4
| | | | svn path=/main/trunk/; revision=14080
* Prepare 308 messages to localization.Arfrever Frehtes Taifersar Arahesis2009-08-151-18/+18
| | | | svn path=/main/trunk/; revision=14067
* Fix lockfile() docstring to correctly document the wantnewlockfile behavior.Zac Medico2009-04-181-2/+4
| | | | | | Thanks to Arfrever for reporting. svn path=/main/trunk/; revision=13355
* Bug #266211 - Handle ESTALE like ENOENT in fetch and locking code. Thanks toZac Medico2009-04-151-2/+2
| | | | | | Krzysztof Olędzki <ole+gentoo@ans.pl> for the initial patch. svn path=/main/trunk/; revision=13347
* For compatibility with python-3.0, use isinstance() instead of type().Zac Medico2009-02-191-11/+12
| | | | svn path=/main/trunk/; revision=12633
* Revert chown behavior change from the previous commit, so that chown willZac Medico2009-01-161-11/+16
| | | | | | not be called on a pre-existing file. svn path=/main/trunk/; revision=12522
* Bug #255101 - Fix 'Permission denied' error handling inZac Medico2009-01-161-9/+18
| | | | | | | NewsManager.getUnreadItems(). If there's no permission to lock the unread file, skip the lock and try to read the file anyway. svn path=/main/trunk/; revision=12521
* Use ebegin/eend to indicate when waiting for a lock and when it's acquired.Zac Medico2009-01-101-10/+13
| | | | | | Thanks to Petteri Räty <belegeuse@g.o> for the suggestion. svn path=/main/trunk/; revision=12415
* Bug #249586 - Use writemsg() to send output to stderr instead of stdout.Zac Medico2008-12-071-10/+15
| | | | svn path=/main/trunk/; revision=12176
* Disable "waiting for lock" messages when in background mode. Thanks to ThargorZac Medico2008-08-121-1/+9
| | | | | | for reporting. svn path=/main/trunk/; revision=11400
* Bug #230469 - Implement non-blocking distlocks for --fetchonly. This addsZac Medico2008-07-031-4/+9
| | | | | | | | | | a "flags" keyword parameter to the portage.locks.lock() function. Default is flags=0. If flags contains os.O_NONBLOCK then lock() will raise portage.exception.TryAgain instead of blocking. This new flags parameter is used to implement non-blocking distlocks in fetch() when fetchonly mode is enabled. svn path=/main/trunk/; revision=10917
* Py3k compatibility patch by Ali Polatel <hawking@g.o>.Zac Medico2008-07-021-5/+8
| | | | | | Don't use the format raise Exception, "string" svn path=/main/trunk/; revision=10890
* Py3k compatibility patch #1 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-011-3/+3
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators.. svn path=/main/trunk/; revision=10870
* Bug #212882 - For compatibility with ENOENT exceptions raised fromZac Medico2008-03-171-2/+18
| | | | | | | fstat calls with CIFS, wrap fstat calls with an appropriate exception handler. svn path=/main/trunk/; revision=9474
* Bug #212882 - Fix lockfile() to handle errno.EACCES raised from the fcntlZac Medico2008-03-101-1/+1
| | | | | | | call since the spec says that it's equivalent to EAGAIN and it appears that CIFS returns EACCES in this case. svn path=/main/trunk/; revision=9458
* Remove more unnecessary list generation.Zac Medico2007-06-211-2/+2
| | | | svn path=/main/trunk/; revision=6913
* For bug #170178, remove all hardcoded references to '/usr/lib/portage'.Zac Medico2007-03-101-1/+2
| | | | svn path=/main/trunk/; revision=6203
* Pass waiting_msg into recursive lockfile() calls.Zac Medico2007-03-031-2/+5
| | | | svn path=/main/trunk/; revision=6156
* For bug #138840, show a more informative message when waiting for a ↵Zac Medico2007-03-031-5/+8
| | | | | | distfiles lock due to parallel-fetch. Thanks to David Watzke <david@watzke.cz> for the initial patch. svn path=/main/trunk/; revision=6143
* Namespace sanitizing, step 2Marius Mauch2007-01-251-4/+4
| | | | | | | Rename portage.exec to portage.process to avoid syntax errors svn path=/main/trunk/; revision=5780
* Namespace sanitizing, step 1Marius Mauch2007-01-251-0/+312
svn path=/main/trunk/; revision=5778