FS#62775 - [git-annex] broken zsh-completion

Attached to Project: Community Packages
Opened by Geno (genofire) - Wednesday, 29 May 2019, 07:24 GMT
Last edited by Felix Yan (felixonmars) - Saturday, 17 August 2019, 03:45 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
the git-annex zsh-completion is empty and in the wrong path


Additional info:
* package version(s)

Workaround:
> git-annex --zsh-completion-script git-annex > /usr/share/zsh/vendor-completions/_git-annex
> mv /usr/share/zsh/vendor-completions/_git-annex /usr/share/zsh/site-functions/_git-annex
This task depends upon

Closed by  Felix Yan (felixonmars)
Saturday, 17 August 2019, 03:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  7.20190730-10
Comment by Eli Schwartz (eschwartz) - Thursday, 15 August 2019, 18:11 GMT
Comment by Eli Schwartz (eschwartz) - Thursday, 15 August 2019, 22:35 GMT
I've also figured out why the completions are completely empty. It is a non-deterministic failure -- the completions are generated by running

./git-annex --zsh-completion-script git-annex > $(DESTDIR)$(PREFIX)/$(SHAREDIR)/zsh/vendor-completions/_git-annex

However, ghc does not create a ./git-annex binary, the Makefile rule "make git-annex" (or make/make build) creates a symlink to dist/build/git-annex/git-annex, and the install-desktop rule depends on it. The install-completions rule does *not* depend on it, so the completions will fail to generate correctly, depending on what order Make ends up fulfilling the build targets.

This is not a Makefile error, because if the command fails it echoes a message about optparse-applicative being "too old", creates a zero-byte file in its place, and continues going.
Comment by Eli Schwartz (eschwartz) - Thursday, 15 August 2019, 22:45 GMT
BTW, Felix -- why does this not use the Makefile target to build? Is it because of the options you're passing to runhaskell Setup configure, which are specific to Arch's ghc? Is there some way to pass this into the Makefile?
Comment by Felix Yan (felixonmars) - Friday, 16 August 2019, 07:02 GMT
Looks like it's doable. I'll try it.
Comment by Eli Schwartz (eschwartz) - Friday, 16 August 2019, 17:52 GMT Comment by Felix Yan (felixonmars) - Saturday, 17 August 2019, 03:45 GMT
Fixed in git-annex-7.20190730-10

Loading...