On Tuesday, 2 August 2016 20:36:59 CEST Richard W.M. Jones wrote:
On Tue, Aug 02, 2016 at 07:14:09PM +0200, Pino Toscano wrote:
run_command uses Unix.create_process which forks a child process, and executes execve: the latter fails when the executable does not exist, triggering the exit which, in older OCaml versions [1], also runs the at_exit handlers.
Since there is not much that can be done to avoid this on the OCaml side, to keep run_command working also in older OCaml version then manually search for the existance of the given executable, exiting with code 127 (as a shell does) in this case.
ACK both.
virt-dib includes the "which" program in appliance/packagelist.in. I notice these patches don't use this program. But is it still needed?
Yes, it's needed as "host dependency" of diskimage-builder -- meaning it is used by the parts of it, diskimage-builder proper or core elements, which run on the host (which means in the appliance, outside of the build chroot). Ditto for qemu-img, curl, kpartx (and debootstrap for building Debian/Ubuntu images). -- Pino Toscano