Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 774384
Collapse All | Expand All

(-)a/lib/portage/locks.py (-1 / +17 lines)
Lines 54-59 def _get_lock_fn(): Link Here
54
		_lock_fn = fcntl.lockf
54
		_lock_fn = fcntl.lockf
55
		return _lock_fn
55
		return _lock_fn
56
56
57
	if _test_lock_fn(
58
		lambda path, fd, flags: functools.partial(
59
			unlockfile, (path, fcntl.flock(fd, flags), 0, fcntl.flock)
60
		)
61
	):
62
		_lock_fn = fcntl.flock
63
		return _lock_fn
64
65
	if not _test_lock_fn(
66
		lambda path, fd, flags: hardlink_lockfile(
67
			path, flags=(os.O_NONBLOCK if flags & fcntl.LOCK_NB else 0)
68
		)
69
		and functools.partial(unlockfile, (path, HARDLINK_FD, 0, None))
70
	):
71
		# TODO: Add fallback to handle missing hardlink permission for android (bug 774384)
72
		pass
73
57
	# Fall back to fcntl.flock.
74
	# Fall back to fcntl.flock.
58
	_lock_fn = fcntl.flock
75
	_lock_fn = fcntl.flock
59
	return _lock_fn
76
	return _lock_fn
60
- 

Return to bug 774384