mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
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:
parent
6ac3d85bae
commit
2f1a6dc0f7
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user