[PATCH libinput 1/5] tools: if the execdir is the builddir, add it to the path

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 4 22:24:40 UTC 2018


On Wed, Jul 04, 2018 at 11:29:26AM +0100, Emil Velikov wrote:
> Hi Peter,
> 
> On 28 June 2018 at 00:51, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> > When running libinput tools from the builddir, look up the subtools in the
> > builddir as well. Otherwise, add the install prefix to the list of lookup
> > locations.
> >
> > This ensures that a) we're running builddir stuff against builddir stuff, but
> > also b) that we're not running builddir stuff against installed stuff because
> > that may give us false positives.
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> > Similar-ish to the git approach Emil suggested in [1] but git is a lot more
> > involved here. Since we only need this for debugging tools, we can pick the
> > simpler approach here and simply ignore most of the corner cases.
> >
> I think that git does thing in that particular way is to ensure a
> consistent lookup approach.

yeah, git cares a lot more about different platforms and features and it
works around a relocatable (relative) execdir. And comparing to the prefix
is 'safer' because you're not leaking the builddir into the binary. But for
this particular use-case ... meh :)

> Personally tools_execdir_is_builddir reads like it should return a
> bool, sadly no better name comes to mind.

indeed. I'll see if I come up with something more telling but given the
limited impact I'm happy enough with the current name. Thanks for the
review.

Cheers,
   Peter


More information about the wayland-devel mailing list