app_no_upgrade -> apps_already_up_to_date

This commit is contained in:
Alexandre Aubin 2019-09-20 14:49:31 +02:00
parent ff2bbb0377
commit 6ed062b41b
3 changed files with 4 additions and 7 deletions

View file

@ -27,7 +27,6 @@
"app_location_install_failed": "Cannot install the app there because it conflicts with the app '{other_app}' already installed in '{other_path}'",
"app_location_unavailable": "This URL is either unavailable, or conflicts with the already installed app(s):\n{apps:s}",
"app_manifest_invalid": "Something is wrong with the app manifest: {error}",
"app_no_upgrade": "All applications are already up-to-date",
"app_not_upgraded": "The app '{failed_app}' failed to upgrade, and as a consequence the following apps upgrades have been cancelled: {apps}",
"app_upgrade_stopped": "The upgrade of all applications has been stopped to prevent possible damage because the previous application failed to upgrade",
"app_not_correctly_installed": "{app:s} seems to be incorrectly installed",
@ -50,6 +49,7 @@
"app_upgrade_failed": "Could not upgrade {app:s}",
"app_upgrade_some_app_failed": "Some applications could not be upgraded",
"app_upgraded": "{app:s} upgraded",
"apps_already_up_to_date": "All applications are already up-to-date",
"apps_permission_not_found": "No permission found for the installed apps",
"apps_permission_restoration_failed": "Grant the permission permission '{permission:s}' to restore {app:s}",
"appslist_corrupted_json": "Could not load the application lists. It looks like {filename:s} is damaged.",

View file

@ -590,7 +590,7 @@ def app_upgrade(app=[], url=None, file=None):
try:
app_list()
except YunohostError:
raise YunohostError('app_no_upgrade')
raise YunohostError('apps_already_up_to_date')
not_upgraded_apps = []
@ -611,7 +611,7 @@ def app_upgrade(app=[], url=None, file=None):
raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id())
if len(apps) == 0:
raise YunohostError('app_no_upgrade')
raise YunohostError('apps_already_up_to_date')
if len(apps) > 1:
logger.info(m18n.n("app_upgrade_several_apps", apps=", ".join(apps)))

View file

@ -584,10 +584,7 @@ def tools_upgrade(operation_logger, apps=None, system=False):
upgradable_apps = [app["id"] for app in _list_upgradable_apps()]
if not upgradable_apps:
logger.info(m18n.n("app_no_upgrade"))
return
elif len(apps) and all(app not in upgradable_apps for app in apps):
if not upgradable_apps or (len(apps) and all(app not in upgradable_apps for app in apps)):
logger.info(m18n.n("apps_already_up_to_date"))
return