Also tested what happens if the other special remote has importtree=yes
and exporttree=yes, and in that case, download via httpalso works too,
without needing to implement any importtree methods here.
It might be possible to make it automatically set exporttree=yes if the
--sameas does. Didn't try, will probably be layering issues.
Or perhaps it should be inherited by sameas like some
other configs? But then, wouldn't it also make sense to inherit
importree=yes? But as shown here, it's not needed by this kind of
remote.
"http" was too generic and easy to confuse with web. The new name makes
clear it's used in addition to some other remote. And other protocols
can use the same naming scheme.
Joey Hess [Fri, 28 Aug 2020 18:28:42 +0000 (14:28 -0400)]
test: Stop gpg-agent daemons that are started for the test framework's gpg key
They normally shutdown when the GNUPGHOME directory is deleted, but on
NFS they keep the directory from being deleted. And also, this avoids
a number of them piling up while the test suite is running.
Joey Hess [Fri, 28 Aug 2020 16:53:51 +0000 (12:53 -0400)]
add stack.yaml for OSX autobuilder
Unfortunately, the autobuilder is using an old version of OSX, and
cannot use ghc newer than the one in lts-13.11. Newer ghc versions use a
libc symbol that is not available.
Since the main stack.yaml has been updated to a newer lts, and just
substituting in lts-13.11 no longer works due to other dependency
issues, it's simplest to use a separate one for the OSX build.
Hopefully this is temporary, and the autobuilder gets updated.
Joey Hess [Tue, 25 Aug 2020 18:57:25 +0000 (14:57 -0400)]
add gitAnnexChildProcess and use instead of incorrect use of runsGitAnnexChildProcess
Fixes reversion in 8.20200617 that made annex.pidlock being enabled result
in some commands stalling, particularly those needing to autoinit.
Renamed runsGitAnnexChildProcess to make clearer where it should be
used.
Arguably, it would be better to have a way to make any process git-annex
runs have the env var set. But then it would need to take the pid lock
when running any and all processes, and that would be a problem when
git-annex runs two processes concurrently. So, I'm left doing it ad-hoc
in places where git-annex really does run a child process, directly
or indirectly via a particular git command.
Joey Hess [Fri, 14 Aug 2020 19:38:31 +0000 (15:38 -0400)]
Display warning when external special remote does not start up properly, or is not usable
I'm sure this used to work, but somewhere along the line something or
things (getCost and getAvailability I think, probably others)
started catching the exception and not displaying it. So, show warnings.
Joey Hess [Fri, 14 Aug 2020 18:40:30 +0000 (14:40 -0400)]
switch to TMVars for thread safety when using the async extension
TVars were not updated atomically, which was ok when each thread got its
own External that was the only thing using these TVars. But, with the
async extension, several External instances can share the same var, so
it needs to be a TMVar to avoid read/write conflicts.
In particular, this makes PREPARE only be sent once.
Joey Hess [Fri, 14 Aug 2020 00:18:06 +0000 (20:18 -0400)]
rethought the async protocol some more
Moving jobid generation to the git-annex side lets it be simplified a
lot.
Note that it will also be possible to generate one jobid per connection,
rather than a new job per request. That will make overflow not an issue,
and will avoid some work, and will simplify some of the code.
Joey Hess [Wed, 12 Aug 2020 19:54:30 +0000 (15:54 -0400)]
relayer receive loop is done
Receive loop looks right. Still need the send loop.
And, a complication is that some messages git-annex
sends need to be wrapped in REPLY_ASYNC, while others
do not. So will probably need to split externalSend
into two.
Joey Hess [Wed, 12 Aug 2020 19:12:09 +0000 (15:12 -0400)]
rethought this protocol again
Now that I've started implementation, I see it's really necessary that
every message the special remote sends use the protocol, otherwise
nasty edge cases abound.
Joey Hess [Wed, 12 Aug 2020 16:30:45 +0000 (12:30 -0400)]
generalized ExternalState to not be limited to a ExternalAddonProcess
Idea is for ASYNC extension, it will instead contain methods that communicate
with the thread that handles all communication with the external process.