mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Ask the user to upgrade to v2.4 on cli
This commit is contained in:
parent
3ffaf913c5
commit
0ac2280fcf
2 changed files with 13 additions and 3 deletions
|
@ -413,16 +413,25 @@ def tools_upgrade(auth, ignore_apps=False, ignore_packages=False, v24=False):
|
|||
"""
|
||||
from yunohost.app import app_upgrade
|
||||
|
||||
# Retrieve interface
|
||||
is_api = True if msettings.get('interface') == 'api' else False
|
||||
|
||||
# Special case for v2.2 to v2.4 upgrade
|
||||
if not v24 and not is_api:
|
||||
try:
|
||||
i = msignals.prompt(m18n.n('upgrade_24_confirm',
|
||||
answers='y/N'))
|
||||
except NotImplemented:
|
||||
pass
|
||||
else:
|
||||
if i == 'y' or i == 'Y':
|
||||
v24 = True
|
||||
if v24:
|
||||
return tools_upgrade_v24(auth)
|
||||
# End of v2.4 special case
|
||||
|
||||
failure = False
|
||||
|
||||
# Retrieve interface
|
||||
is_api = True if msettings.get('interface') == 'api' else False
|
||||
|
||||
if not ignore_packages:
|
||||
cache = apt.Cache()
|
||||
cache.open(None)
|
||||
|
|
|
@ -197,6 +197,7 @@
|
|||
|
||||
"format_datetime_short" : "%m/%d/%Y %I:%M %p",
|
||||
|
||||
"upgrade_24_confirm" : "YunoHost should be upgraded to v2.4, do you want to proceed? [{answers:s}]",
|
||||
"upgrade_24_not_jessie" : "Upgrading to YunoHost v2.4 will only work on Debian Jessie. Please upgrade your system before upgrading YunoHost.",
|
||||
"upgrade_24_update_failed" : "An error occurred while updating the packages list, you should maybe check your network connection.",
|
||||
"upgrade_24_system_failed" : "An error occurred while upgrading your system, we will try to fix broken packages...",
|
||||
|
|
Loading…
Add table
Reference in a new issue