]> git.ipfire.org Git - thirdparty/libvirt.git/commit
meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg
authorPavel Hrdina <phrdina@redhat.com>
Fri, 10 Jul 2020 10:07:16 +0000 (12:07 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:26:36 +0000 (09:26 +0200)
commit2298b42878ac7ead8fb2c2704331b1f471656049
treed3c8a90c1dac99e3292a423e00e4b7fcdda27da8
parent71f95ea1a481aeef26f55e0c9151c3ac47013e90
meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg

With meson we no longer have .libs directory with the actual binary so
we have to take a different approach to detect if running from build
directory.

This is not as robust as for autotools because if you select --prefix
in the build directory it will incorrectly enable the override as well
but nobody should do that.

We have to modify some of the tests to not add current build path into
PATH variable and use the full path for virsh instead. Otherwise it
would be impossible to figure out that we are running virsh from build
directory.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
src/util/virfile.c
tests/virsh-optparse
tests/virsh-schedinfo