Исправлена проверка обновления

legacy27 3.6.10
parent 2451599fdf
commit beed790b61

@ -1735,6 +1735,14 @@ class Update(MethodsInterface):
new_portage_state_hash = ps.get_state()
ini.setVar('system', {'portage_hash': new_portage_state_hash})
return True
def drop_portage_state_hash(self):
"""
Сбросить состояние
"""
ini = SystemIni(self.clVars)
ini.delVar('system', 'portage_hash')
return True
def update_fastlogin_domain_path(self):
try:

@ -260,6 +260,10 @@ class ClUpdateAction(Action):
{'name': 'update_fastlogin_domain',
'method': "Update.update_fastlogin_domain_path()"
},
{'name': 'drop_portage_hash_on_sync',
'method': 'Update.drop_portage_state_hash()',
'condition': lambda Get: Get('cl_update_outdate_set') == 'on'
},
{'name': 'premerge_group',
'group': __("Checking for updates"),
'tasks': [
@ -284,6 +288,7 @@ class ClUpdateAction(Action):
Get('cl_update_settings_changes_set') == 'on' or
Get('cl_update_binhost_recheck_set') == 'on' or
Get('cl_update_force_fix_set') == 'on' or
Get('cl_update_available_set') == 'on' or
Get('update.cl_update_package_cache_set') == 'on')
},
{'name': 'update_other',
@ -432,6 +437,11 @@ class ClUpdateAction(Action):
# сообщение удачного завершения при обновлении ревизии
{'name': 'update:save_portage_hash',
'method': 'Update.save_portage_state_hash()',
'condition': lambda Get: Get('cl_update_sync_only_set') == 'off'
},
{'name': 'drop_portage_hash',
'method': 'Update.drop_portage_state_hash()',
'depend': Tasks.failed()
},
# сообщение удачного завершения при обновлении ревизии
{'name': 'success_rev',

@ -1535,6 +1535,15 @@ class VariableClUpdateOutdatedKernelSet(ReadonlyVariable):
ui = UpdateInfo(self.parent)
return "on" if ui.outdated_kernel else "off"
class VariableClUpdateAvailableSet(ReadonlyVariable):
"""
Есть обновления
"""
type = "bool"
def get(self):
ui = UpdateInfo(self.parent)
return "on" if ui.need_update() else "off"
class VariableClUpdateBinhostList(Variable):
"""

Loading…
Cancel
Save