mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
e2f2d337c7
commit
67451248eb
@ -147,7 +147,11 @@ deb-src {protocol}://deb.debian.org/debian buster-backports main
|
||||
|
||||
def _check_and_backports_sources():
|
||||
"""Add buster backports sources after checking if it is available."""
|
||||
sources_list = '/etc/apt/sources.list.d/freedombox.list'
|
||||
old_sources_list = '/etc/apt/sources.list.d/freedombox.list'
|
||||
if os.path.exists(old_sources_list):
|
||||
os.remove(old_sources_list)
|
||||
|
||||
sources_list = '/etc/apt/sources.list.d/freedombox2.list'
|
||||
if os.path.exists(sources_list):
|
||||
print('Repositories list up-to-date. Skipping update.')
|
||||
return
|
||||
|
||||
4
debian/postrm
vendored
4
debian/postrm
vendored
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user