изменено: pym/update/update.py

изменено:      pym/update/utils/cl_update.py
	изменено:      pym/update/variables/update.py
master 3.7.2.50
root 1 year ago
parent 9aad9102be
commit 0bca2fc5cd

@ -1573,6 +1573,8 @@ class Update(MethodsInterface):
self.clVars.Set('update.cl_update_binhost_recheck_set', Variable.On)
self.clVars.Set('cl_update_package_cache_set', Variable.Off, force=True)
raise
self.clVars.Write('cl_update_binhost', url_binhost.split('/grp/')[0])
self.clVars.Set('update.cl_update_binhost', url_binhost.split('/grp/')[0])
return True
class Reason():
@ -1622,7 +1624,8 @@ class Update(MethodsInterface):
dv.Write('cl_update_binhost_set', "off")
dv.Set('cl_update_binhost_set', 'off')
if (not dv.Get('update.cl_update_binhost_choice') and not dv.GetBool('update.cl_update_binhost_set')) \
or dv.Get('update.cl_update_binhost_choice') == 'auto':
or dv.Get('update.cl_update_binhost_choice') == 'auto' \
or (dv.Get('update.cl_update_binhost') and not dv.GetBool('update.cl_update_binhost_set')):
if dv.Get('cl_update_binhost_stable_opt_set'):
binhost_list = dv.Get('cl_update_binhost_list')
else:
@ -1846,7 +1849,7 @@ class Update(MethodsInterface):
self.clVars.Set('update.cl_update_binhost_data',
retval or Variable.EmptyTable, force=True)
if not ignore_level:
best_binhost_level = int(self.clVars.Get("update.cl_update_binhost_level")[0]) or None
best_binhost_level = int(self.clVars.Get("update.cl_update_binhost_level")[0])
#int(sorted(self.clVars.Get("update.cl_update_binhost_level"), key=int)[-1])
# int(self.clVars.Get("update.cl_update_binhost_level")[0])

@ -141,7 +141,6 @@ def get_synchronization_tasks(object_name):
'method': Object('download_packages(update.cl_update_portage_binhost,'
'update.cl_update_package_cache, update.cl_update_package_cache_sign,'
'update.cl_update_gpg)'),
'essential': False,
'condition': lambda Get, GetBool: (
Get('update.cl_update_package_cache') and (
Get('update.cl_update_outdate_set') == 'on' or

@ -207,8 +207,6 @@ class VariableClUpdateRepHostingChoice(Variable):
self.help = (_("Hosting to download repository from"))
def choice(self):
a = [x[1] for x in self.Get('cl_update_inner_rep_list')]
b = self.Get('cl_update_inner_rep_list')
return [x[1] for x in self.Get('cl_update_inner_rep_list')] or ['Default']
@ -1841,8 +1839,12 @@ class VariableClUpdatePortageBinhost(ReadonlyVariable):
"""
Прописываемый в /etc/portage/make.conf/binhost репозиторий
"""
value_format = "{update.cl_update_binhost}/grp/{os_arch_machine}"
#value_format = "{update.cl_update_binhost}/grp/{os_arch_machine}"
def get(self):
if self.Get('update.cl_update_binhost_choice'):
return f"{self.Get('update.cl_update_binhost_choice')}/grp/{self.Get('os_arch_machine')}"
return f"{self.Get('update.cl_update_binhost')}/grp/{self.Get('os_arch_machine')}"
class VariableClUpdatePackageCache(ReadonlyVariable):
"""

Loading…
Cancel
Save