Browse Source

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

tags/3.6.9.3
parent
commit
beed790b61
3 changed files with 27 additions and 0 deletions
  1. +8
    -0
      pym/update/update.py
  2. +10
    -0
      pym/update/utils/cl_update.py
  3. +9
    -0
      pym/update/variables/update.py

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

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


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

@@ -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',


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

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