Optimize OS/release/version detection for faster execution #70

Merged
benpro merged 86 commits from fast-debian-check into master 2019-04-05 11:01:57 +02:00
Showing only changes of commit ae12b37c7f - Show all commits

View file

@ -797,10 +797,10 @@ if is_debian; then
if [ "$IS_BACKPORTSCONF" = 1 ]; then
if is_debian_stretch; then
grep -qsE "^[^#].*backports" /etc/apt/sources.list \
&& failed "IS_BACKPORTSCONF"
&& failed "IS_BACKPORTSCONF" "backports can't be in main sources list"
if grep -qsE "^[^#].*backports" /etc/apt/sources.list.d/*.list; then
grep -qsE "^[^#].*backports" /etc/apt/preferences.d/* \
|| failed "IS_BACKPORTSCONF"
|| failed "IS_BACKPORTSCONF" "backports must have preferences"
fi
fi
fi