|
|
@ -19,7 +19,7 @@ from calculate.core.server.func import Action, Tasks
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate, getLazyLocalTranslate
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate, getLazyLocalTranslate
|
|
|
|
from calculate.lib.cl_template import TemplatesError
|
|
|
|
from calculate.lib.cl_template import TemplatesError
|
|
|
|
from calculate.lib.utils.binhosts import BinhostError
|
|
|
|
from calculate.lib.utils.binhosts import BinhostError
|
|
|
|
from calculate.lib.utils.files import FilesError
|
|
|
|
from calculate.lib.utils.files import FilesError, readFile
|
|
|
|
from calculate.update.update import UpdateError
|
|
|
|
from calculate.update.update import UpdateError
|
|
|
|
from calculate.update.emerge_parser import EmergeError
|
|
|
|
from calculate.update.emerge_parser import EmergeError
|
|
|
|
from calculate.lib.utils.git import GitError
|
|
|
|
from calculate.lib.utils.git import GitError
|
|
|
@ -48,6 +48,14 @@ class UpdateConditions(object):
|
|
|
|
or Get('cl_update_outdated_kernel_set') == 'on')
|
|
|
|
or Get('cl_update_outdated_kernel_set') == 'on')
|
|
|
|
return func
|
|
|
|
return func
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
|
|
|
def force_preserved(Get):
|
|
|
|
|
|
|
|
pfile = "/var/lib/portage/preserved_libs_registry"
|
|
|
|
|
|
|
|
content = readFile(pfile).strip()
|
|
|
|
|
|
|
|
if not content or content[1:-1].strip() == '':
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
class ClUpdateAction(Action):
|
|
|
|
class ClUpdateAction(Action):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
@ -139,11 +147,12 @@ class ClUpdateAction(Action):
|
|
|
|
{'name': 'update_other:preserved_rebuild',
|
|
|
|
{'name': 'update_other:preserved_rebuild',
|
|
|
|
'message': __('Updating preserved libraries'),
|
|
|
|
'message': __('Updating preserved libraries'),
|
|
|
|
'method': 'Update.emerge("","@preserved-rebuild")',
|
|
|
|
'method': 'Update.emerge("","@preserved-rebuild")',
|
|
|
|
'condition': UpdateConditions.was_installed(
|
|
|
|
'condition': lambda Get: (UpdateConditions.was_installed(
|
|
|
|
'.*', EmergeMark.PreservedLibs),
|
|
|
|
'.*', EmergeMark.PreservedLibs)() or
|
|
|
|
|
|
|
|
UpdateConditions.force_preserved(Get)),
|
|
|
|
'decoration': 'Update.update_task("%s")' %
|
|
|
|
'decoration': 'Update.update_task("%s")' %
|
|
|
|
EmergeMark.PreservedLibs
|
|
|
|
EmergeMark.PreservedLibs
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{'name': 'update_other:revdev_rebuild',
|
|
|
|
{'name': 'update_other:revdev_rebuild',
|
|
|
|
'message': __('Checking reverse dependencies'),
|
|
|
|
'message': __('Checking reverse dependencies'),
|
|
|
|
'method': 'Update.revdep_rebuild("revdep-rebuild")',
|
|
|
|
'method': 'Update.revdep_rebuild("revdep-rebuild")',
|
|
|
|