From dcf2ca8b550dae29e9085288bd0380e4ca463fd9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 22 Feb 2019 15:06:11 +0100 Subject: [PATCH] Check dpkg status asap in app_install --- src/yunohost/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 61b9c69e4..159017c89 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -708,6 +708,9 @@ def app_install(operation_logger, auth, app, label=None, args=None, no_remove_on no_remove_on_failure -- Debug option to avoid removing the app on a failed installation force -- Do not ask for confirmation when installing experimental / low-quality apps """ + if packages.dpkg_is_broken(): + raise YunohostError(m18n.n("dpkg_is_broken")) + from yunohost.hook import hook_add, hook_remove, hook_exec, hook_callback from yunohost.log import OperationLogger @@ -725,9 +728,6 @@ def app_install(operation_logger, auth, app, label=None, args=None, no_remove_on }, } - if packages.dpkg_is_broken(): - raise YunohostError(m18n.n("dpkg_is_broken")) - def confirm_install(confirm): # Ignore if there's nothing for confirm (good quality app), if --force is used