Re: [libvirt PATCH 008/351] meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Wednesday in 2020, Peter Krempa wrote:
On Thu, Jul 16, 2020 at 11:54:04 +0200, Pavel Hrdina wrote:
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.

This wouldn't be that much of a problem as it would end up pointing to
the same files.

More of a problem is if we falsely assume that the override is not
necessary.


That's why I'd rather drop this "override-by-binary-path" approach
and use the env variable in the "run" script for this.

You'd only get the override if you asked for it.

Fortunately it's mostly a problem for developers.

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@xxxxxxxxxx>
---
 src/util/virfile.c    | 34 ++++++++++++++++++-------
 tests/virsh-optparse  | 58 +++++++++++++++++++------------------------
 tests/virsh-schedinfo | 12 +++------

The test changes can be separated out of this patch.

 3 files changed, 54 insertions(+), 50 deletions(-)


Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux