Добавлена возможность прерывать сборку пакета при неподходящем патче

legacy27 3.6.7.7
Mike Hiretsky 4 years ago
parent 12c37f21a3
commit be40284579

@ -51,7 +51,7 @@ from utils.files import (getModeFile, listDirectory, removeDir, typeFile,
pathJoin, readFile, readLinesFile, process)
from utils.mount import Mounts
from utils.tools import iterate_list, has_any
from datavars import DataVarsError, VariableError, SimpleDataVars
from datavars import DataVarsError, VariableError, CriticalError, SimpleDataVars
from calculate.lib.configparser import (ConfigParser, NoSectionError,
ParsingError)
@ -6109,6 +6109,10 @@ gettext -d cl_template "$*"
raise TemplatesError(
(_("Failed to use %s ") % formatTemplate) +
nameFileTemplate)
if (self.objVar.Get('cl_ebuild_phase') == 'compile' and
self.objVar.Get('cl_template_wrong_patch') == 'break'):
raise CriticalError(_("Failed to use patch ") +
nameFileTemplate)
raise TemplatesError(_("Failed to use patch ") +
nameFileTemplate)
elif (formatTemplate == 'diff' and

@ -838,3 +838,15 @@ class VariableOsPython(ReadonlyVariable):
getInstalledAtom("dev-lang/python",prefix=chroot_path),
reverse=True):
return "python{SLOT}".format(**atom)
class VariableClTemplateWrongPatch(Variable):
"""
Действие выполняемое в случае если патч в EBUILD_PHASE=configure не подходит
"""
type = "choice"
value = "warning"
def choice(self):
return [("warning", _("Show warning")),
("break", _("Break package building"))]

Loading…
Cancel
Save