diff --git a/src/app.py b/src/app.py index c2d4d0a89..67e0617dd 100644 --- a/src/app.py +++ b/src/app.py @@ -62,6 +62,7 @@ from yunohost.utils.system import ( dpkg_is_broken, get_ynh_package_version, system_arch, + debian_version, human_to_binary, binary_to_human, ram_available, @@ -2854,6 +2855,7 @@ def _make_environment_for_app_script( "YNH_APP_MANIFEST_VERSION": manifest.get("version", "?"), "YNH_APP_PACKAGING_FORMAT": str(manifest["packaging_format"]), "YNH_ARCH": system_arch(), + "YNH_DEBIAN_VERSION": debian_version(), } if workdir: diff --git a/src/utils/system.py b/src/utils/system.py index 2538f74fb..a169bd62c 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -28,6 +28,10 @@ logger = logging.getLogger("yunohost.utils.packages") YUNOHOST_PACKAGES = ["yunohost", "yunohost-admin", "moulinette", "ssowat"] +def debian_version(): + return check_output('grep "^VERSION_CODENAME=" /etc/os-release | cut -d= -f2') + + def system_arch(): return check_output("dpkg --print-architecture")