image.in, build-vm: handle qemu-img absence properly
This isn't a warning cause, this is a error cause!
This commit is contained in:
parent
a173bbd070
commit
0f2411ec34
@ -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)" && \
|
||||
|
Loading…
Reference in New Issue
Block a user