|
|
|
@ -135,7 +135,6 @@ class VariableClBuilderSourceFilename(Variable):
|
|
|
|
|
type = "file"
|
|
|
|
|
element = 'file'
|
|
|
|
|
opt = ["--source"]
|
|
|
|
|
value = ""
|
|
|
|
|
metavalue = "SOURCE"
|
|
|
|
|
untrusted = True
|
|
|
|
|
|
|
|
|
@ -173,6 +172,11 @@ class VariableClBuilderSourceFilename(Variable):
|
|
|
|
|
fullname="%s%s" % (fullname, subname),
|
|
|
|
|
build=build, ver=ver, arch=arch)
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
if self.Get('os_root_type') == 'livecd':
|
|
|
|
|
return '/run/initramfs/live'
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClBuilderSource(ReadonlyVariable):
|
|
|
|
|
"""
|
|
|
|
@ -473,7 +477,7 @@ class VariableClBuilderNewId(BaseBuildId):
|
|
|
|
|
def check(self, value):
|
|
|
|
|
if not value and self.Get('cl_builder_source_filename'):
|
|
|
|
|
raise VariableError(_("Please specify the id"))
|
|
|
|
|
if not re.match("^[A-Za-z][A-Za-z0-9/:_-]+$", value):
|
|
|
|
|
if value and not re.match("^[A-Za-z][A-Za-z0-9/:_-]+$", value):
|
|
|
|
|
raise VariableError(_("Wrong symbols in build ID"))
|
|
|
|
|
if value in self.Get('cl_builder_storage'):
|
|
|
|
|
raise VariableError(_("Assemble %s already exists")%value)
|
|
|
|
|