mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
apps: fix a bug where YunoHost would complain that 'it needs X RAM but only Y left' with Y > X because some apps have a higher runtime RAM requirement than build time ...
This commit is contained in:
parent
7924bb2b28
commit
4152cb0dd1
1 changed files with 9 additions and 1 deletions
10
src/app.py
10
src/app.py
|
@ -2782,10 +2782,18 @@ def _check_manifest_requirements(
|
|||
ram_requirement["runtime"]
|
||||
)
|
||||
|
||||
# Some apps have a higher runtime value than build ...
|
||||
if ram_requirement["build"] != "?" and ram_requirement["runtime"] != "?":
|
||||
max_build_runtime = (ram_requirement["build"]
|
||||
if human_to_binary(ram_requirement["build"]) > human_to_binary(ram_requirement["runtime"])
|
||||
else ram_requirement["runtime"])
|
||||
else:
|
||||
max_build_runtime = ram_requirement["build"]
|
||||
|
||||
yield (
|
||||
"ram",
|
||||
can_build and can_run,
|
||||
{"current": binary_to_human(ram), "required": ram_requirement["build"]},
|
||||
{"current": binary_to_human(ram), "required": max_build_runtime},
|
||||
"app_not_enough_ram", # i18n: app_not_enough_ram
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue