[Libguestfs] [PATCH v2 0/2] lib: Allow db_dump package to be a weak dependency

Richard W.M. Jones rjones at redhat.com
Fri Oct 6 13:52:15 UTC 2017


Previously posted:
https://www.redhat.com/archives/libguestfs/2017-October/msg00032.html

This takes a completely different approach.  It turns out that POSIX /
the shell already defines a special exit code 127 for ‘command not
found’.  We can make a small adjustment to lib/command.c to return
this exit code in that case.

Then we just have to modify the db_dump code to test for this exit
code.

I also made db_dump unconditional, allowing the packager to either
build without db_dump present at all, and/or to make db_dump into a
weak runtime dependency which will be silently ignored if not present
by the mechanism above.

Rich.




More information about the Libguestfs mailing list