From a801ce6dbf736dfe3c365ab48f1978a95c6781fb Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Thu, 3 Sep 2015 10:46:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BC=D0=B5=D0=BD=D0=B5=20?= =?UTF-8?q?binhost,=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20binhost=5Flist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 9 +++++++++ pym/update/utils/cl_update.py | 3 +++ pym/update/variables/update.py | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pym/update/update.py b/pym/update/update.py index e6ec9ea..74c120c 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -136,6 +136,7 @@ class Update(object): map(emerge_parser.GitCheckvalue, self.clVars.Get('update.cl_update_rep_path'))) self.update_map = {} + self.refresh_binhost = False def get_prog_path(self, progname): return getProgPath(progname) @@ -1127,9 +1128,17 @@ class Update(object): self.clVars.Delete('cl_update_binhost', location="system") raise UpdateError("Binhost is unavailable") if write_binhost: + if hosts[0] != self.clVars.Get('cl_update_binhost'): + self.refresh_binhost = True self.clVars.Write('cl_update_binhost', hosts[0], location="system") return True + def message_binhost_changed(self): + if self.refresh_binhost: + self.printWARNING(_("Binhost was changed to %s") % + self.clVars.Get('cl_update_binhost')) + return True + def update_binhost_list(self): """ Обновить список binhost'ов после обновления до master веток diff --git a/pym/update/utils/cl_update.py b/pym/update/utils/cl_update.py index 9cdd7a6..1264929 100644 --- a/pym/update/utils/cl_update.py +++ b/pym/update/utils/cl_update.py @@ -289,6 +289,9 @@ class ClUpdateAction(Action): 'condition': lambda Get: (Get('cl_dispatch_conf') != 'skip' and Get('cl_update_pretend_set') == 'off') }, + {'name': 'binhost_changed', + 'method': 'Update.message_binhost_changed()' + }, ] } ] + emerge_tasks + [ diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 55c831c..75da7c9 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -1394,7 +1394,7 @@ class VariableClUpdateBinhostList(Variable): Список хостов с бинарными обновлениями """ type = "list" - value = ["ftp://ftp.calculate.ru/pub/calculate"] + value = ["ftp://ftp.calculate-linux.ru/pub/calculate"] class VariableClUpdateBinhost(Variable): """