FEAT: added check for non-calculate world update

master
idziubenko 2 years ago
parent 5deecf793e
commit a68d23c18f

@ -26,3 +26,4 @@ class EmergeMark:
RevdepRebuild = "revdep rebuild"
Prelink = "prelink"
Automagic = "check for auto depends"
SaveTag = "save latest calculate update tag"

@ -259,6 +259,13 @@ class UpdateConditions():
return False
else:
return True
@staticmethod
def check_world_updated_after_tag_save():
def func():
task = EmergeLog(EmergeLogNamedTask(EmergeMark.SaveTag))
return task.did_update_world_happen()
return func
class ClUpdateAction(Action):
"""
@ -416,6 +423,13 @@ class ClUpdateAction(Action):
{'name': 'check_run',
'method': 'Update.checkRun(cl_update_wait_another_set)'
},
{'name': 'check_if_world_was_updated',
'method': 'Update.update_set_current_saved_tag()',
# 'condition': UpdateConditions.check_world_updated_after_tag_save()
'condition': lambda Get: (Get('cl_update_sync_only_set') == 'off' and \
Get('cl_update_pretend_set') == 'off' and \
UpdateConditions.check_world_updated_after_tag_save()())
},
] + get_synchronization_tasks("Update") + [
{'name': 'system_configuration',
'group': __("System configuration"),
@ -477,7 +491,8 @@ class ClUpdateAction(Action):
'depend': (Tasks.success() & Tasks.hasnot("interrupt") &
Tasks.success_all("update") & Tasks.hasnot("check_schedule")),
'condition': lambda Get: Get('cl_update_sync_only_set') == 'off' and
Get('cl_update_pretend_set') == 'off'
Get('cl_update_pretend_set') == 'off',
'decoration': 'Update.update_task("%s")' % EmergeMark.SaveTag
},
{'name': 'clear_migration_host',
'method': 'Update.delete_binhost()',

Loading…
Cancel
Save