X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F03-get-sources;h=5d59b070e723921a5e9c7b9c55b65d0ac77c756b;hb=6e61fc1fc4b79cc4506783c03e441a3686d287d2;hp=fc7afb473760aae0a16d9439f667868039d7da4c;hpb=9dafaad2fe959f195d68a38655f60d00ee028256;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/03-get-sources b/etc/grml/fai/config/scripts/GRMLBASE/03-get-sources index fc7afb4..5d59b07 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/03-get-sources +++ b/etc/grml/fai/config/scripts/GRMLBASE/03-get-sources @@ -6,9 +6,6 @@ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ -[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf -[ -n "$GRML_LIVE_LOCAL_CONFIG" ] && . "$GRML_LIVE_LOCAL_CONFIG" - if ifclass SOURCES ; then echo "Class SOURCES set, retrieving source packages." else @@ -25,6 +22,8 @@ bailout() { rm -f "$PACKAGE_LIST" } +$ROOTCMD apt-get update + $ROOTCMD dpkg-query -W -f='${Package}\n' > "${PACKAGE_LIST}" if ! [ -r "${PACKAGE_LIST}" ] ; then @@ -45,11 +44,19 @@ apt-get --download-only source "$package" 2>>/grml-live/sources/errors.log EOT done - if grep -q . "${target}/grml-live/sources/errors.log" ; then + if grep -q '^E:' "${target}/grml-live/sources/errors.log" ; then echo "Errors noticed while retrieving sources:" >&2 cat "${target}/grml-live/sources/errors.log" >&2 bailout exit 1 + elif grep -q '^W:' "${target}/grml-live/sources/errors.log" ; then + echo "Warnings noticed while retrieving sources (not failing the build though):" + cat "${target}/grml-live/sources/errors.log" + elif grep -q '.' "${target}/grml-live/sources/errors.log" ; then + echo "Unclassified problems noticed while retrieving sources:" >&2 + cat "${target}/grml-live/sources/errors.log" >&2 + bailout + exit 1 fi fi