From ba023c3ef8c540c8c0845d93e7aaa759ba5a9e9b Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Thu, 25 Jun 2020 20:09:49 -0400 Subject: [PATCH] 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 [sunil: Minor change to the printed message] Signed-off-by: Sunil Mohan Adapa Reviewed-by: Sunil Mohan Adapa --- actions/upgrades | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/actions/upgrades b/actions/upgrades index 3db0e7ac1..f96ba270c 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -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.')