Closed Bug 1367741 Opened 3 years ago Closed 2 years ago

mach try/autotry should search libexec paths when looking for git-cinnabar


(Firefox Build System :: Try, enhancement)

Not set


(Not tracked)



(Reporter: ato, Assigned: ato)




(1 file)

We should probably include the git libexec paths, /usr/libexec/git-core and /usr/local/libexec/git-core, when searching for the git-cinnabar program on Unix platforms.

When following git-cinnabar’s installation instructions, it does not automatically get placed in a directory on PATH.  Instead, it gets placed in git’s libexec path, which is meant for programs to be called by other programs and not directly by users.  Invoking git subcommands happens through a “dispatcher program” that looks in the above-mentioned libexec directories for internal commands.

See my writeup about libexec paths on

An alternative approach is to invoke `git cinnabar --help` and check its exit code, but expanding the search path we pass to `which.which` seems less invasive.
Blocks: 1149670
Testing this patch:

> % which git-cinnabar
> % 
> % ./mach try -b do -p all -u all -t none
> mach try is under development, please file bugs blocking 1149670.
> [1367741 f2aeae1e30d1] try: -b do -p all -u all -t none
> Bundling 1 changesets
> Bundling 2 changesets
> Bundling 2 changesets
> Bundling 1 manifests
> Bundling 1 manifests
> Bundling 0 files
> Bundling 1 files
> remote: adding changesets
> remote: adding manifests
> remote: adding file changes
> remote: added 2 changesets with 1 changes to 1 files (+1 heads)
> remote: recorded push in pushlog
> remote: 
> remote: View your changes here:
> remote:
> remote:
> remote: 
> remote: Follow the progress of your build on Treeherder:
> remote:
> remote: recorded changegroup in replication log in 0.094s
> To hg::ssh://
>  * [new branch]                HEAD -> branches/default/tip
> %
Assignee: nobody → ato
Attachment #8871263 - Flags: review?(cmanchester) → review?(mh+mozilla)
Comment on attachment 8871263 [details]
Bug 1367741 - Search libexec paths on Unix systems for git-cinnabar;

It would actually be better to check the exit code for `git cinnabar -h`, because libexec is only one possibility where git might look things up. As a matter of fact, the way I have git and git-cinnabar installed neither has git-cinnabar in $PATH nor in /usr/**/libexec.
Attachment #8871263 - Flags: review?(mh+mozilla)
Product: Core → Firefox Build System
Component: Mach Core → Try
This bug is no longer valid since has been removed and
we no longer run a which test on git-cinnabar.
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.