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

ASSIGNED
Assigned to

Status

()

Core
mach
ASSIGNED
5 months ago
5 months ago

People

(Reporter: ato, Assigned: ato)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

5 months ago
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 http://sny.no/2017/05/libexec.

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.
(Assignee)

Updated

5 months ago
Blocks: 1149670
(Assignee)

Comment 1

5 months ago
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:   https://hg.mozilla.org/try/rev/040bf45799b972150278b296d5d2b7fa69c9a85e
> remote:   https://hg.mozilla.org/try/rev/eecee1dfd25c90010dd251591200f5f7e30c44e0
> remote: 
> remote: Follow the progress of your build on Treeherder:
> remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=eecee1dfd25c90010dd251591200f5f7e30c44e0
> remote: recorded changegroup in replication log in 0.094s
> To hg::ssh://hg.mozilla.org/try
>  * [new branch]                HEAD -> branches/default/tip
> %
Comment hidden (mozreview-request)
(Assignee)

Updated

5 months ago
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)
Attachment #8871263 - Flags: review?(cmanchester) → review?(mh+mozilla)

Comment 4

5 months ago
mozreview-review
Comment on attachment 8871263 [details]
Bug 1367741 - Search libexec paths on Unix systems for git-cinnabar;

https://reviewboard.mozilla.org/r/142752/#review147712

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)
You need to log in before you can comment on or make changes to this bug.