On Wed, Jan 29, 2025 at 02:12:35PM -0600, Justin Tobler wrote:
Show 23 quoted lines
> On 25/01/29 08:11AM, Patrick Steinhardt wrote:
> > When the runtime prefix option is enabled, Git is built such that it
> > knows to locate its binaries relative to the directory a binary is being
> > executed from. This requires us to figure out relative paths, which is
> > handled in `system_prefix()` by trying to strip a couple of well-known
> > paths.
>
> Ok if I understand this correctly, when the runtime prefix option is
> enabled, the prefix that gets setup by `system_prefix()` is expected to
> be relative from the directory the binary is being executed at.
>
> > One of these paths, GIT_EXEC_PATH, is expected to be absolute when
> > runtime prefixes are enabled, but relative otherwise. And while our
> > Makefile gets this correcty, in Meson we always wire up the absolute
>
> s/correcty/correctly/
>
> > path, which may result in us not being able to find binaries.
>
> So the problem is that since GIT_EXEC_PATH is always defined as
> absolute, when the runtime prefix option is enabled, the relative prefix
> is not able to be correctly set and thus always uses the
> `FALLBACK_RUNTIME_PREFIX`.