diff --git a/pym/update/update.py b/pym/update/update.py index 3c92c7e..aa81fc9 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -20,6 +20,7 @@ from os import path import os import time from calculate.core.server.gen_pid import search_worked_process +from calculate.core.setup_cache import Cache as SetupCache from calculate.lib.cl_template import SystemIni from calculate.lib.datavars import DataVarsError @@ -1046,3 +1047,8 @@ class Update(object): except OSError: pass return True + + def updateSetupCache(self): + cache = SetupCache(self.clVars) + cache.update(force=True) + return True diff --git a/pym/update/utils/cl_update.py b/pym/update/utils/cl_update.py index c13a202..0a4bdbc 100644 --- a/pym/update/utils/cl_update.py +++ b/pym/update/utils/cl_update.py @@ -239,6 +239,12 @@ class ClUpdateAction(Action): Get('cl_update_eixupdate_force') != 'skip' or Get('cl_update_eixupdate_force') == 'force')) }, + {'name': 'update_setup_cache', + 'message': __("Updating the package setup cache"), + 'method': 'Update.updateSetupCache()', + 'essential': False, + 'condition': lambda Get: Get('cl_update_outdate_set') == 'on' + }, {'name': 'sync_reps:cleanpkg', 'message': __("Removing obsolete distfiles and binary packages"), 'method': 'Update.cleanpkg()',