mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
upgrades: Skip enabling backports on testing and unstable
Uses lsb-release which is a dependency of unattended-upgrades. Closes: #1844. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> [sunil: Minor change to the printed message] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
0c7c4b12fb
commit
ba023c3ef8
@ -211,6 +211,12 @@ def _check_and_backports_sources():
|
||||
'backports.')
|
||||
return
|
||||
|
||||
release = subprocess.check_output(['lsb_release', '--release',
|
||||
'--short']).decode().strip()
|
||||
if release in ['testing', 'unstable']:
|
||||
print(f'System release is {release}. Skip enabling backports.')
|
||||
return
|
||||
|
||||
protocol = _get_protocol()
|
||||
if protocol == 'tor+http':
|
||||
print('Package download over Tor is enabled.')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user