From d275ed169ab04a422aa8295f77a1e6d8a29703c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 24 Aug 2018 15:47:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B4=D0=B2=D0=BE=D0=B9=D0=BD=D0=BE=D0=B9=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=20=D1=82=D0=BE=D0=BC,=20?= =?UTF-8?q?=D1=87=D1=82=D0=BE=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=BD=D0=B0=D0=B9=D0=B4=D0=B5=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 2 +- pym/update/utils/cl_update.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pym/update/update.py b/pym/update/update.py index 05f3905..c7a621a 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -1308,7 +1308,7 @@ class Update(MethodsInterface): self.clVars.Get("update.cl_update_portage_binhost_path")) if path.exists(binhost_fn): os.unlink(binhost_fn) - return True + return False def update_binhost_list(self, dv=None): """ diff --git a/pym/update/utils/cl_update.py b/pym/update/utils/cl_update.py index e8f3861..8f45908 100644 --- a/pym/update/utils/cl_update.py +++ b/pym/update/utils/cl_update.py @@ -57,10 +57,6 @@ def get_synchronization_tasks(object_name): Get('update.cl_update_sync_rep') and Get('update.cl_update_binhost')) }, - {'name': 'not_use_search:failed_base_binhost', - 'error': __("Failed to use base binhost"), - 'depend': AllTasks.failed_all("check_current_binhost") - }, {'name': 'group_find_binhost', 'group': '', 'while': (~AllTasks.has_any("detect_best_binhost") & @@ -125,12 +121,17 @@ def get_synchronization_tasks(object_name): }, ], }, + {'name': 'not_use_search:failed_base_binhost', + 'error': __("Failed to use base binhost"), + 'method': Object("delete_binhost()"), + 'depend': AllTasks.failed_all("check_current_binhost") + }, {'name': 'no_server', 'error': __("Failed to find the binary updates server"), 'method': Object("delete_binhost()"), # method: который должен удалить текущую информацию о сервере обновлений - 'depend': (Tasks.failed() | - Tasks.success() & AllTasks.failed_one_of("update_packages_cache")), + 'depend': (~Tasks.has_any("failed_base_binhost") & (Tasks.failed() | + Tasks.success() & AllTasks.failed_one_of("update_packages_cache"))), 'condition': lambda GetBool, Get: (GetBool('update.cl_update_usetag_set') and Get('update.cl_update_sync_rep')), },