Drop grml-mercurial-utils from GRML_FULL and GRML_MEDIUM.
[grml-live.git] / grml-live
index da67813..aaaf48f 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -572,6 +572,25 @@ else
 fi # BUILD_DIRTY?
 # }}}
 
+# package validator {{{
+CHECKLOG=/var/log/fai/$HOSTNAME/last
+# package validator
+if [ -r "$CHECKLOG/package_errors.log" ] && grep -q '[a-z]' "$CHECKLOG/package_errors.log" ; then
+
+   if [ -n "$EXIT_ON_MISSING_PACKAGES" ] ; then
+      eerror "The following packages were requested for installation but could not be processed:"
+      cat $CHECKLOG/package_errors.log
+      eerror "... exiting as requested via \$EXIT_ON_MISSING_PACKAGES."
+      eend 1
+      bailout 13
+   else
+      ewarn "The following packages were requested for installation but could not be processed:"
+      cat $CHECKLOG/package_errors.log
+      eend 0
+   fi
+fi
+# }}}
+
 # BUILD_OUTPUT - execute arch specific stuff and squashfs {{{
 [ -n "$BUILD_OUTPUT" ] || BUILD_OUTPUT="$OUTPUT/grml_cd"
 mkdir -p "$BUILD_OUTPUT" || bailout 6 "Problem with creating $BUILD_OUTPUT for stage ARCH"
@@ -1101,14 +1120,6 @@ fi
 # }}}
 
 # finalize {{{
-CHECKLOG=/var/log/fai/$HOSTNAME/last
-# package validator
-if [ -r "$CHECKLOG/package_errors.log" ] && grep -q '[a-z]' "$CHECKLOG/package_errors.log" ; then
-   ewarn "The following packages were requested for installation but could not be processed:"
-   cat $CHECKLOG/package_errors.log
-   eend 0
-fi
-
 [ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"
 einfo "Successfully finished execution of $PN [$(date) - running ${SECONDS} seconds]" ; eend 0
 log "Successfully finished execution of $PN [$(date) - running ${SECONDS} seconds]"