mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
apps: add 'YNH_DEBIAN_VERSION' variable in apps contexts
This commit is contained in:
parent
b887545c3e
commit
df6a2a2cd2
2 changed files with 6 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue