diff options
author | Zac Medico <zmedico@gentoo.org> | 2019-02-18 23:51:07 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2019-02-18 23:54:39 -0800 |
commit | d192213dab5b55fba9d200daad1cb2dde763136e (patch) | |
tree | 2318789b7c71262dfc20d571a4a45d2df24f97e8 | |
parent | Updates for portage-2.3.61 release (diff) | |
download | gentoo-portage-d192213dab5b55fba9d200daad1cb2dde763136e.tar.xz gentoo-portage-d192213dab5b55fba9d200daad1cb2dde763136e.zip |
locks: check for removed lockfile only if unlinkfile is True
Check for a removed lockfile only if unlinkfile is True, since
in this case the parent directory must be writable. This fixes
emergelog usage where the parent directory is not writable.
Bug: https://bugs.gentoo.org/678278
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r-- | lib/portage/locks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/portage/locks.py b/lib/portage/locks.py index 510925da0..a23d5cb56 100644 --- a/lib/portage/locks.py +++ b/lib/portage/locks.py @@ -273,7 +273,7 @@ def lockfile(mypath, wantnewlockfile=0, unlinkfile=0, if isinstance(lockfilename, basestring) and \ - myfd != HARDLINK_FD and _lockfile_was_removed(myfd, lockfilename): + myfd != HARDLINK_FD and unlinkfile and _lockfile_was_removed(myfd, lockfilename): # The file was deleted on us... Keep trying to make one... os.close(myfd) writemsg(_("lockfile recurse\n"), 1) |