upgrades: Display correct backports info for unstable

Backports are not enabled and cannot be activated on unstable.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Add statement that backports may not be necessary]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy 2020-07-21 19:53:51 -04:00
parent 8f4681fd10
commit 2f7b3264d1
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 16 additions and 8 deletions

View File

@ -15,20 +15,27 @@
Frequent feature updates can be activated. Activating them is
recommended.
{% endblocktrans %}
{% else %}
{% elif is_backports_enabled %}
{% blocktrans trimmed %}
Frequent feature updates are enabled.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
Frequent feature updates cannot be activated. They may not be necessary
on your distribution.
{% endblocktrans %}
{% endif %}
</p>
<p>
{% blocktrans trimmed %}
This will allow a very limited set of software, including FreedomBox
service, to be updated to receive newer features regularly instead of once
every 2 years or so. Note that packages with frequent feature updates do
not have support from Debian Security Team. They are instead maintained by
contributors to Debian and the FreedomBox community.
{% endblocktrans %}
{% if can_activate_backports or is_backports_enabled %}
{% blocktrans trimmed %}
This will allow a very limited set of software, including FreedomBox
service, to be updated to receive newer features regularly instead of
once every 2 years or so. Note that packages with frequent feature
updates do not have support from Debian Security Team. They are instead
maintained by contributors to Debian and the FreedomBox community.
{% endblocktrans %}
{% endif %}
</p>
{% if can_activate_backports %}
<div class="alert alert-warning" role="alert">

View File

@ -29,6 +29,7 @@ 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['is_backports_enabled'] = upgrades.is_backports_enabled()
context['is_busy'] = package.is_package_manager_busy()
context['log'] = get_log()
context['refresh_page_sec'] = 3 if context['is_busy'] else None