Browse Source

Добавлено сообщение при смене binhost, исправлен binhost_list

tags/3.4.0_alpha1
Mike Khiretskiy 6 years ago
parent
commit
a801ce6dbf
3 changed files with 13 additions and 1 deletions
  1. +9
    -0
      pym/update/update.py
  2. +3
    -0
      pym/update/utils/cl_update.py
  3. +1
    -1
      pym/update/variables/update.py

+ 9
- 0
pym/update/update.py View File

@@ -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 веток


+ 3
- 0
pym/update/utils/cl_update.py View File

@@ -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 + [


+ 1
- 1
pym/update/variables/update.py View File

@@ -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):
"""


Loading…
Cancel
Save