Avoid more than 1 gpg password prompt at the same time

Which could happen occasionally before when concurrency is enabled.
While not much of a problem when it did happen, better to avoid it. Also,
since it seems likely the gpg-agent sometimes fails in such a situation,
this makes it not happen when running a single git-annex command with
concurrency enabled.

This commit was sponsored by Jake Vosloo on Patreon.
This commit is contained in:
Joey Hess 2021-04-27 16:36:33 -04:00
parent 42cacb4099
commit 0f73b6d03a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 42 additions and 14 deletions

View file

@ -0,0 +1,13 @@
[[!comment format=mdwn
username="joey"
subject="""comment 3"""
date="2021-04-27T20:33:41Z"
content="""
I've implemented the race protection. Pretty sure this fixes it, at least
to the extent it can be fixed if it's a gpg bug that any 2 concurrent
password prompts can sometimes trigger. I'll run git-annex fsck in a
loop for an hour or so to be more sure.
It would be nice if someone wants to file a bug on gpg, but I don't have
time right now.
"""]]