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

[Libguestfs] [PATCH v2 0/3] library: improve handling of external tools


the libguestfs library uses a number of external tools; for some of
them, we search for them at build time, enabling some feature only if
found, and later on assuming at runtime they are installed. However,
the situation is more complex than that:
- hardcoding the full path means that there is an incoherency in the
  way some of the tools are used, as some other tools (e.g. qemu-img)
  are just run as assumed to be in $PATH; also hardcoding means
  libguestfs cannot use different versions of those tools
- some of the tools are actually optional, and their runtime lack can
  be handled gracefully instead of throwing a "failed to execute" error

The chosen approach is to build a process-wide cache in the libguestfs
library of paths of tools searched, even in case they are not available:
this way it is easier to just skip something at runtime if a program is
not there.  The patch series applies it for the libdb tools, and for
the tools used to extract icons from guests.


Pino Toscano (3):
  lib: add internal cache for external application
  lib: improve libdb tools handling at runtime (RHBZ#1409024)
  inspect: make netpbm and icoutils really optional runtime tools

 lib/Makefile.am            |   1 +
 lib/external-apps.c        | 190 +++++++++++++++++++++++++++++++++++++++++++++
 lib/guestfs-internal.h     |   3 +
 lib/inspect-apps.c         |  14 +++-
 lib/inspect-icon.c         |  54 +++++++------
 m4/guestfs-find-db-tool.m4 |   2 +-
 m4/guestfs_progs.m4        |  24 ------
 7 files changed, 237 insertions(+), 51 deletions(-)
 create mode 100644 lib/external-apps.c


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