# License: This file is licensed under the GPL v2 or any later version.
################################################################################
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
-[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
-
if ifclass SOURCES ; then
echo "Class SOURCES set, retrieving source packages."
else
rm -f "$PACKAGE_LIST"
}
+$ROOTCMD apt-get update
+
$ROOTCMD dpkg-query -W -f='${Package}\n' > "${PACKAGE_LIST}"
if ! [ -r "${PACKAGE_LIST}" ] ; then
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