On Wed, Jun 15, 2022 at 01:02:08PM +0200, Paolo Bonzini wrote: > On 6/15/22 10:30, Daniel P. Berrangé wrote: > > I don't think this is an attractive approach to the problem, > > because it results in us adding a bunch of meson rules to > > simulate 'make install' within the build dir. This is undesirable > > clutter IMHO, and can be solved more simply by just modifying the > > qemu_find_file() method. > > > > The core problem is the impl of qemu_find_file is taking the wrong > > approach, in several ways, but mostly because of its use of a single > > 'data_dirs' array for all types of file. This is bad because it > > has the assumption that build dir and install dir layouts match, > > and second because when we add extra firmware data dirs, we don't > > want this used for non-firmware files. > > > > We need to separate out the handling of different types of resources > > for this to work correctly. > > In some sense this is what Akihiko did - instead of separating them in > qemu_find_file(), the "pre-install" layout separates them in the filesystem. > While I had remarks on the implementation I think it's a sensible approach. > > The pre-install directory could even be created as a custom_target, using > the JSON files from Meson introspection.
Doing that is more complicated than just refactoring qemu_find_file, such that its search locations can be tailored per file type, just by setting a couple variables in the code IMHO. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|