mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] generate a journal for app installation
This commit is contained in:
parent
a6d89f8ea1
commit
5fba284260
1 changed files with 7 additions and 1 deletions
|
@ -653,6 +653,7 @@ def app_install(auth, app, label=None, args=None, no_remove_on_failure=False):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.hook import hook_add, hook_remove, hook_exec
|
from yunohost.hook import hook_add, hook_remove, hook_exec
|
||||||
|
from yunohost.journals import Journal
|
||||||
|
|
||||||
# Fetch or extract sources
|
# Fetch or extract sources
|
||||||
try:
|
try:
|
||||||
|
@ -738,7 +739,12 @@ def app_install(auth, app, label=None, args=None, no_remove_on_failure=False):
|
||||||
try:
|
try:
|
||||||
install_retcode = hook_exec(
|
install_retcode = hook_exec(
|
||||||
os.path.join(extracted_app_folder, 'scripts/install'),
|
os.path.join(extracted_app_folder, 'scripts/install'),
|
||||||
args=args_list, env=env_dict, user="root")
|
args=args_list, env=env_dict, user="root"
|
||||||
|
journal = Journal(
|
||||||
|
["install", app_instance_name],
|
||||||
|
"app", args=args_list, env=env_dict
|
||||||
|
),
|
||||||
|
)
|
||||||
except (KeyboardInterrupt, EOFError):
|
except (KeyboardInterrupt, EOFError):
|
||||||
install_retcode = -1
|
install_retcode = -1
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Reference in a new issue