Commit 0f2411ec authored by Michael Shigorin's avatar Michael Shigorin

image.in, build-vm: handle qemu-img absence properly

This isn't a warning cause, this is a error cause!
parent a173bbd0
......@@ -39,7 +39,8 @@ convert-image: prepare-image
*) VM_FORMAT="$(IMAGE_TYPE)"; \
esac; \
if ! type -t qemu-img >&/dev/null; then \
echo "** warning: qemu-img not available" >&2; \
echo "** error: qemu-img not available" >&2; \
exit 1; \
else \
qemu-img convert -O "$$VM_FORMAT" \
"$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \
......
......@@ -80,6 +80,10 @@ imagedir:
postprocess: | $(addprefix postprocess-,$(sort $(POSTPROCESS_TARGETS)))
@OUTSIZE="`ls -lh "$(IMAGE_OUTPATH)" | cut -f5 -d' '`"; \
if [ ! -n "$$OUTSIZE" ]; then \
echo "** error: $(IMAGE_OUTPATH) missing" >&2; \
exit 1; \
fi; \
echo "** image: $(IMAGE_OUTPATH) [$$OUTSIZE]" >&2 && \
echo "IMAGE_OUTPATH = $(IMAGE_OUTPATH)" && \
echo "IMAGE_OUTFILE = $(IMAGE_OUTFILE)" && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment