|
|
|
@ -1490,7 +1490,7 @@ class Update(MethodsInterface):
|
|
|
|
|
|
|
|
|
|
if not changes:
|
|
|
|
|
return False
|
|
|
|
|
self.create_binhost_data(a)
|
|
|
|
|
self.create_binhost_data()
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def drop_binhosts(self, dv):
|
|
|
|
@ -1624,10 +1624,14 @@ class Update(MethodsInterface):
|
|
|
|
|
binhost_list = dv.Get('cl_update_binhost_unstable_list')
|
|
|
|
|
dv.Write('cl_update_binhost_set', "off")
|
|
|
|
|
else:
|
|
|
|
|
if dv.Get('cl_update_binhost_choice'):
|
|
|
|
|
dv.Write('cl_update_binhost', dv.Get('cl_update_binhost_choice'))
|
|
|
|
|
dv.Write('cl_update_binhost_set', "on")
|
|
|
|
|
binhost_list = [dv.Get('cl_update_binhost')]
|
|
|
|
|
# if dv.Get('cl_update_binhost_choice'):
|
|
|
|
|
# dv.Write('cl_update_binhost', dv.Get('cl_update_binhost_choice'))
|
|
|
|
|
# dv.Write('cl_update_binhost_set', "on")
|
|
|
|
|
binhost = dv.Get('cl_update_binhost_choice')
|
|
|
|
|
if not binhost.startswith('https://') and not binhost.startswith('ftp://') and not binhost.startswith(
|
|
|
|
|
'http://'):
|
|
|
|
|
binhost = f"https://{binhost}"
|
|
|
|
|
binhost_list = [binhost]
|
|
|
|
|
|
|
|
|
|
self.binhosts_data = Binhosts(
|
|
|
|
|
# значение малозначимо, поэтому берётся из собирающей системы
|
|
|
|
@ -1637,6 +1641,7 @@ class Update(MethodsInterface):
|
|
|
|
|
last_ts, binhost_list,
|
|
|
|
|
self.get_arch_machine(),
|
|
|
|
|
gpg=dv.Get('update.cl_update_gpg'))
|
|
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
@variable_module("update")
|
|
|
|
@ -1742,8 +1747,8 @@ class Update(MethodsInterface):
|
|
|
|
|
"""
|
|
|
|
|
Проверка текущего сервера обновлений на валидность
|
|
|
|
|
"""
|
|
|
|
|
if not binhost_url in self.binhosts_data.binhost_list:
|
|
|
|
|
raise UpdateError(_("Current binhost is absent in list of update servers"))
|
|
|
|
|
# if not binhost_url in self.binhosts_data.binhost_list:
|
|
|
|
|
# raise UpdateError(_("Current binhost is absent in list of update servers"))
|
|
|
|
|
binhost = self.binhosts_data.get_binhost(binhost_url)
|
|
|
|
|
ignore_level = self.clVars.Get("cl_update_ignore_level") == Variable.On
|
|
|
|
|
cur_level_valid = self.is_current_level_a_digit() if not ignore_level else None
|
|
|
|
@ -1800,6 +1805,8 @@ class Update(MethodsInterface):
|
|
|
|
|
raise UpdateError(
|
|
|
|
|
_("Current binhost {} has wrong signature").format(
|
|
|
|
|
binhost_url))
|
|
|
|
|
self.clVars.Write('cl_update_binhost', binhost_url)
|
|
|
|
|
self.clVars.Write('cl_update_binhost_set', 'on')
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def get_migration_mirror_url(self, host, level):
|
|
|
|
|