diff --git a/debian/changelog b/debian/changelog index 63e0a4e4f..820649958 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,12 @@ yunohost (12.0.0) unstable; urgency=low -- Alexandre Aubin Thu, 04 May 2023 20:30:19 +0200 +yunohost (11.2.11.2) stable; urgency=low + + - More oopsies (22b30c79) + + -- Alexandre Aubin Thu, 11 Apr 2024 16:03:20 +0200 + yunohost (11.2.11.1) stable; urgency=low - Missing import oopsi (29c597ed) diff --git a/helpers/utils b/helpers/utils index 34748d72b..ef850bf92 100644 --- a/helpers/utils +++ b/helpers/utils @@ -843,7 +843,7 @@ ynh_get_debian_release() { _acceptable_path_to_delete() { local file=$1 - local forbidden_paths=$(ls -d / /* /{var,home,usr}/* /etc/{default,sudoers.d,yunohost,cron*} /etc/yunohost/{apps,domains,hooks.d} /opt/yunohost) + local forbidden_paths=$(ls -d / /* /{var,home,usr}/* /etc/{default,sudoers.d,yunohost,cron*} /etc/yunohost/{apps,domains,hooks.d} /opt/yunohost 2> /dev/null) # Legacy : A couple apps still have data in /home/$app ... if [[ -n "${app:-}" ]] diff --git a/src/utils/resources.py b/src/utils/resources.py index ca1c8ca4e..c7d29c665 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -148,16 +148,19 @@ class AppResource: self.manager = manager properties = self.default_properties | properties + # It's not guaranteed that this info will be defined, e.g. during unit tests, only small resource snippets are used, not proper manifests + app_upstream_version = "" + if manager and manager.wanted and "version" in manager.wanted: + app_upstream_version = manager.wanted["version"].split("~")[0] + elif manager and manager.current and "version" in manager.current: + app_upstream_version = manager.current["version"].split("~")[0] + replacements: dict[str, str] = { "__APP__": self.app, "__YNH_ARCH__": system_arch(), "__YNH_DEBIAN_VERSION__": debian_version(), "__YNH_DEBIAN_VERSION_ID__": debian_version_id(), - "__YNH_APP_UPSTREAM_VERSION__": ( - manager.wanted["version"].split("~")[0] - if manager.wanted - else manager.current["version"].split("~")[0] - ), + "__YNH_APP_UPSTREAM_VERSION__": app_upstream_version, } def recursive_apply(function: Callable, data: Any) -> Any: