datalad / datalad-installer

Installation script for Datalad and related components
MIT License
6 stars 3 forks source link

for extracted standalone .deb version of git-annex point PATH not to usr/bin of it but to usr/lib/git-annex.linux/ #159

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago

since usr/bin has no git then a "wrong git" would be used, which could lead to either

jwodder commented 1 year ago

@yarikoptic Exactly which git-annex installation method uses the "standalone .deb version"?

yarikoptic commented 1 year ago

a number of them, e.g. datalad/git-annex ones whenever you use --install-dir .

jwodder commented 1 year ago

@yarikoptic Please be more specific than "a number of them." Does this apply every time git-annex is installed from a .deb (excluding when apt does the installation)? I also don't see why it would only apply when --install-dir is used.

yarikoptic commented 1 year ago

it is concerned with this code path https://github.com/datalad/datalad-installer/blob/HEAD/src/datalad_installer.py#L2666 , confirming that it is in effect only whenever --install-dir defined. So any method/code-path which leads to that code, and yes -- " every time git-annex is installed from a .deb (excluding when apt does the installation)".

On the last point: to say the truth I do not fully understand either that aspect... anyways -- weekend is upon us, may be I get a better idea over it.

yarikoptic commented 1 year ago

searched up original issue I keep running into if the git on the PATH before usr/bin of the --install-dir'ed git-annex is too old: https://git-annex.branchable.com/forum/error__58___bogus_format_in_GIT__95__CONFIG__95__PARAMETERS/

jwodder commented 1 year ago

I can confirm that, for DEBs installed via the datalad/git-annex, datalad/git-annex:release, datalad/git-annex:tested, and datalad/packages methods, the only files the downloaded DEBs install under usr/bin/ are git-annex and git-annex-shell, which are symlinks to the files of the same name in usr/lib/git-annex.linux/. While the usr/lib/git-annex.linux/ folders in these DEBs do contain a git executable, they also contain a number of directories and non-executable files, which makes them seem like inappropriate candidates for placing in PATH.

Also, the deb-url method could be used to install any DEB, including ones which don't follow the structure of the ones used by the other methods.

yarikoptic commented 1 year ago

Good analysis, thanks. I guess I should have just read Joey's comment more carefully -- we better fix up our builds. Sent https://github.com/datalad/git-annex/pull/162

yarikoptic commented 9 months ago

note that I ran into the same problem on rolando where PATH points to some ancient git-annex.linux/ dump so has also outdated git. Now I could not overload with just pointing to extracted /usr/bin/ content which had only git-annex* and no git. but resolution would be to get rid of that antiquated git-annex installation there anyways