upgrades: Fix premature adding of buster-backports sources

It is incorrect to check for backports availability, FreedomBox systems got
added buster-backports sources prematurely. This will lead to apt update
failures resulting in FreedomBox becoming unable to install new apps.

Fix this by removing old sources and adding new sources only after
performing (this time correct) backports URL check.

Closes: #1496.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-02-09 19:36:03 -05:00
1 parent e2f2d337c7
commit 67451248eb
2 files changed
+9 -1

No files matched your search

+4
View File
@@ -14,6 +14,10 @@ purge)
rm -f /etc/apt/sources.list.d/freedombox.list
fi
if [ -e '/etc/apt/sources.list.d/freedombox2.list' ]; then
rm -f /etc/apt/sources.list.d/freedombox2.list
fi
if [ -e '/etc/apt/preferences.d/50freedombox.pref' ]; then
rm -f /etc/apt/preferences.d/50freedombox.pref
fi