|
|
|
@ -699,7 +699,6 @@ class VariableClBuilderImageFilename(Variable):
|
|
|
|
|
Название iso образа
|
|
|
|
|
"""
|
|
|
|
|
opt = ["--iso"]
|
|
|
|
|
value = ""
|
|
|
|
|
metavalue = "IMAGE"
|
|
|
|
|
untrusted = True
|
|
|
|
|
|
|
|
|
@ -713,12 +712,20 @@ class VariableClBuilderImageFilename(Variable):
|
|
|
|
|
if not value:
|
|
|
|
|
raise VariableError(_("You must specify image filename"))
|
|
|
|
|
|
|
|
|
|
def _isoname(self):
|
|
|
|
|
def _isoname(self, dn):
|
|
|
|
|
shortname = self.Get('os_builder_linux_shortname').lower()
|
|
|
|
|
buildnumber = self.Get('os_builder_linux_build')
|
|
|
|
|
arch = self.Get('os_builder_arch_machine')
|
|
|
|
|
return "%s-%s-%s.iso" % (shortname, buildnumber,
|
|
|
|
|
arch)
|
|
|
|
|
for i in range(0, 999):
|
|
|
|
|
if i:
|
|
|
|
|
isoname = "%s-%s-%d-%s.iso" % (shortname, buildnumber,
|
|
|
|
|
i, arch)
|
|
|
|
|
else:
|
|
|
|
|
isoname = "%s-%s-%s.iso" % (shortname, buildnumber,
|
|
|
|
|
arch)
|
|
|
|
|
fullname = path.join(dn, isoname)
|
|
|
|
|
if not path.exists(fullname):
|
|
|
|
|
return fullname
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
build_id = self.Get('cl_builder_id')
|
|
|
|
@ -727,8 +734,7 @@ class VariableClBuilderImageFilename(Variable):
|
|
|
|
|
if self.Get('os_root_type_ext') in RootType.RebuildAvailable:
|
|
|
|
|
base_dn = self.Get('cl_builder_flash_repository')
|
|
|
|
|
if build_id:
|
|
|
|
|
imagename = self._isoname()
|
|
|
|
|
return path.join(base_dn, imagename)
|
|
|
|
|
return self._isoname(base_dn)
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|