src/cmd-build: use explicit location of ISO for virt-install
Using `*.iso` as the location of the ISO when invoking `virt-install`
will cause problems if you have multiple ISOs present (as can happen
during development/test).  This changes the behavior to explicitly
provide a path to the ISO via the `INSTALLER` env var.
@@ -229,6 +229,9 @@ else
extraargs="${extraargs} --kickstart ${image_input}"
fi
+# forgive me for this sin
+location="${workdir}/installer/$(basename "${INSTALLER}")"
+
set +x
# This generates the "base image"; not specific to a platform.
run_virtinstall() {
@@ -241,7 +244,7 @@ run_virtinstall() {
--kickstart-out "${PWD}"/tmp/flattened.ks \
--ostree-remote="${name}" --ostree-stateroot="${name}" \
--ostree-ref="${ref:-${commit}}" \
- --location "${workdir}"/installer/*.iso \
+ --location "${location}" \
--ostree-repo="${workdir}"/repo ${extraargs-} "$@"
mv "${tmpdest}" "${dest}"
}
