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