diff --git a/srcpkgs/vmklive/files/mklive.sh.in b/srcpkgs/vmklive/files/mklive.sh.in index 4eae6946407..1930429738b 100755 --- a/srcpkgs/vmklive/files/mklive.sh.in +++ b/srcpkgs/vmklive/files/mklive.sh.in @@ -265,6 +265,15 @@ if [ "$(id -u)" -ne 0 ]; then error_out fi +# +# Check there are repos registered before anything. +# +${XBPS_REPO_CMD} list >/dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "No repositories available, exiting..." + error_out +fi + # # Mount pseudofs in the target rootfs. # @@ -289,6 +298,12 @@ for f in ${PACKAGE_LIST}; do info_msg " $f" done if [ -z "$ROOTDIR" ]; then + # Check that all pkgs are reachable. + ${XBPS_BIN_CMD} ${XBPS_ARGS} -n install ${PACKAGE_LIST} >>$LOGFILE 2>&1 + if [ $? -ne 0 ]; then + info_msg "Missing required binary packages, exiting..." + error_out + fi ${XBPS_BIN_CMD} ${XBPS_ARGS} install ${PACKAGE_LIST} \ 2>&1|cat >> $LOGFILE || error_out ${XBPS_BIN_CMD} ${XBPS_ARGS} autoupdate \ diff --git a/srcpkgs/vmklive/template b/srcpkgs/vmklive/template index 4ee2436b531..a387c925a4a 100644 --- a/srcpkgs/vmklive/template +++ b/srcpkgs/vmklive/template @@ -1,6 +1,6 @@ # Template file for 'vmklive' pkgname=vmklive -version=0.8.2 +version=0.8.3 short_desc="Void GNU/Linux live image maker" maintainer="Juan RP " license="Public domain"