Kaynağa Gözat

Добавлена дополнительная проверка необходимости запуска emerge @preserved-rebuild

tags/3.5.1.2
ebeveyn
işleme
0822bf5fee
1 değiştirilmiş dosya ile 13 ekleme ve 4 silme
  1. +13
    -4
      pym/update/utils/cl_update.py

+ 13
- 4
pym/update/utils/cl_update.py Dosyayı Görüntüle

@@ -19,7 +19,7 @@ from calculate.core.server.func import Action, Tasks
from calculate.lib.cl_lang import setLocalTranslate, getLazyLocalTranslate
from calculate.lib.cl_template import TemplatesError
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.emerge_parser import EmergeError
from calculate.lib.utils.git import GitError
@@ -48,6 +48,14 @@ class UpdateConditions(object):
or Get('cl_update_outdated_kernel_set') == 'on')
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):
"""
@@ -139,11 +147,12 @@ class ClUpdateAction(Action):
{'name': 'update_other:preserved_rebuild',
'message': __('Updating preserved libraries'),
'method': 'Update.emerge("","@preserved-rebuild")',
'condition': UpdateConditions.was_installed(
'.*', EmergeMark.PreservedLibs),
'condition': lambda Get: (UpdateConditions.was_installed(
'.*', EmergeMark.PreservedLibs)() or
UpdateConditions.force_preserved(Get)),
'decoration': 'Update.update_task("%s")' %
EmergeMark.PreservedLibs
},
},
{'name': 'update_other:revdev_rebuild',
'message': __('Checking reverse dependencies'),
'method': 'Update.revdep_rebuild("revdep-rebuild")',


Yükleniyor…
İptal
Kaydet