upgrades: Show dist of backports to be activated

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2020-07-13 14:44:26 -07:00
1 parent 6ac3d85bae
commit 2f1a6dc0f7
2 files changed
+5 -1

No files matched your search

@@ -14,7 +14,7 @@
{% blocktrans trimmed %}
Backports can be activated. This will allow a limited set of software,
including FreedomBox service, to be upgraded to newer versions from
Debian backports repository.
Debian {{ dist }}-backports repository.
{% endblocktrans %}
</p>
<p>
+4
View File
@@ -3,6 +3,8 @@
FreedomBox app for upgrades.
"""
import subprocess
from django.contrib import messages
from django.shortcuts import redirect
from django.urls import reverse_lazy
@@ -29,6 +31,8 @@ class UpgradesConfigurationView(AppView):
def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs)
context['can_activate_backports'] = upgrades.can_activate_backports()
context['dist'] = subprocess.check_output(
['lsb_release', '--codename', '--short']).decode().strip()
context['is_busy'] = package.is_package_manager_busy()
context['log'] = get_log()
context['refresh_page_sec'] = 3 if context['is_busy'] else None