GNOME Bugzilla – Bug 780373
JHBuild is only detected when installed in ~/.local/bin/jhbuild
Last modified: 2017-03-24 23:00:51 UTC
Builder assumes that the JHBuild's executable is ~/.local/bin/jhbuild, which can be wrong. For example, in Arch Linux the most convenient and recommended way to install JHBuild is through its AUR packages [1]. In this case, JHBuild's executable would end up in /usr/bin/jhbuild. To solve this, Builder should honor the PATH environment variable when looking for JHBuild. The effect would be that when the JHBuild executable is accessible in a terminal, it's also accessible to Builder. Keeping ~/.local/bin/jhbuild as a fallback is useful for systems where ~/.local/bin/ is not in the PATH by default. (again, in Arch Linux) I have a simple patch in the works. I'll upload it when I finish testing it. [1] https://wiki.archlinux.org/index.php/JHBuild#Installation
>Install the jhbuild AUR package, which usually provides the stable version. > > Alternatively, you may want to install jhbuild-git AUR for latest JHBuild version in GNOME repository. Just want to note JHBuild has no stable releases so that is a broken concept to begin with. It is designed to be ran directly out of a git repo and the codebase directly references its git repo, so I wouldn't be surprised if that package was easily broken.
(In reply to Dor Askayo from comment #0) > Builder assumes that the JHBuild's executable is ~/.local/bin/jhbuild, which > can be wrong. For example, in Arch Linux the most convenient and recommended > way to install JHBuild is through its AUR packages [1]. In this case, > JHBuild's executable would end up in /usr/bin/jhbuild. [1] is bad advice. You should not be using jhbuild from a package manager because you're likely to get stale modulesets or use modulesets that have not been updated in lockstep with jhbuild fixes to support those modulesets.
But that said, I'm still perfectly fine with accepting patches that allow it to work.
I completely agree. However, Arch Linux also has a package that follows git [1]. Also, some people may prefer to install their self-built packages in a different path. We shouldn't deprive them of that ability. [1] https://aur.archlinux.org/packages/jhbuild-git/
Created attachment 348453 [details] [review] Patch v1
Review of attachment 348453 [details] [review]: I don't like the idea of spawning a process every time we need to spawn a process. So we should cache the first successful result. Trying to recover from the user changing their jhbuild installation out from under us is not something I'm interested in protecting against.
Created attachment 348515 [details] [review] Patch v2
Review of attachment 348515 [details] [review]: LGTM, although generally I prefer to see super() used instead of directly calling the parent __init__.
Created attachment 348547 [details] [review] Patch v3 Done :)
Review of attachment 348547 [details] [review]: LGTM
Thanks!