diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 57e89e2a7..bdfead85c 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -156,10 +156,18 @@ def app_info(app, full=False): def _app_upgradable(app_infos): + from packaging import version # Determine upgradability # In case there is neither update_time nor install_time, we assume the app can/has to be upgraded + # Firstly use the version to know if an upgrade is available + if app_infos["version"] != "-" and app_infos["from_catalog"]["manifest"].get("version", None): + if version.parse(app_infos["version"]) < version.parse(app_infos["from_catalog"]["manifest"].get("version", "-")): + return "yes" + else: + return "no" + if not app_infos.get("from_catalog", None): return "url_required" if not app_infos["from_catalog"].get("lastUpdate") or not app_infos["from_catalog"].get("git"):