|
|
|
@ -19,6 +19,7 @@ from calculate.lib.cl_template import TemplateFormat
|
|
|
|
|
from calculate.lib.utils.text import _u
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
from os import path
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
_ = lambda x: x
|
|
|
|
|
setLocalTranslate('cl_lib3', sys.modules[__name__])
|
|
|
|
@ -96,9 +97,20 @@ class world(TemplateFormat):
|
|
|
|
|
pkg = pkg[1:]
|
|
|
|
|
else:
|
|
|
|
|
warn = False
|
|
|
|
|
if pkg in old_doc:
|
|
|
|
|
old_doc.remove(pkg)
|
|
|
|
|
elif warn:
|
|
|
|
|
if pkg.endswith(":*"):
|
|
|
|
|
re_match = re.compile("^{0}$|^{0}:.*$".format(pkg[:-2])).match
|
|
|
|
|
remove_records = [x for x in old_doc if re_match(x)]
|
|
|
|
|
if remove_records:
|
|
|
|
|
for del_pkg in remove_records:
|
|
|
|
|
old_doc.remove(del_pkg)
|
|
|
|
|
else:
|
|
|
|
|
warn &= True
|
|
|
|
|
else:
|
|
|
|
|
if pkg in old_doc:
|
|
|
|
|
old_doc.remove(pkg)
|
|
|
|
|
else:
|
|
|
|
|
warn &= True
|
|
|
|
|
if warn:
|
|
|
|
|
if callable(self.parent.printWARNING):
|
|
|
|
|
self.parent.printWARNING(
|
|
|
|
|
_("Not found {package} in world").format(package=pkg))
|
|
|
|
|