|
|
|
@ -701,8 +701,9 @@ class VariableClBuilderImageFilename(Variable):
|
|
|
|
|
metavalue = "IMAGE"
|
|
|
|
|
untrusted = True
|
|
|
|
|
|
|
|
|
|
live_base_dn = '/run/initramfs/live/iso'
|
|
|
|
|
hdd_base_dn = '/var/calculate/linux'
|
|
|
|
|
flash_base_dn = '/run/initramfs/live/iso'
|
|
|
|
|
flash_iso_base_dn = '/run/initramfs/isoscan/iso'
|
|
|
|
|
default_base_dn = '/var/calculate/linux'
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("Image path")
|
|
|
|
@ -721,10 +722,12 @@ class VariableClBuilderImageFilename(Variable):
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
build_id = self.Get('cl_builder_id')
|
|
|
|
|
if self.Get('os_root_type') != 'livecd':
|
|
|
|
|
base_dn = self.hdd_base_dn
|
|
|
|
|
else:
|
|
|
|
|
base_dn = self.live_base_dn
|
|
|
|
|
base_dn = self.default_base_dn
|
|
|
|
|
|
|
|
|
|
if self.Get('os_root_type') == 'livecd':
|
|
|
|
|
if self.Get('cl_flash_set') == 'on':
|
|
|
|
|
base_dn = self.flash_base_dn
|
|
|
|
|
# TODO: для iso-scan из flash
|
|
|
|
|
if build_id:
|
|
|
|
|
imagename = self._isoname()
|
|
|
|
|
return path.join(base_dn, imagename)
|
|
|
|
@ -1205,3 +1208,17 @@ class VariableClBuilderRebuildChangedSet(Variable):
|
|
|
|
|
self.help = _("rebuild changed packages")
|
|
|
|
|
self.label = _("Rebuild changed packages")
|
|
|
|
|
|
|
|
|
|
class VariableClBuilderRescratchSet(ReadonlyVariable):
|
|
|
|
|
"""
|
|
|
|
|
Сборка iso образа на самой флешке
|
|
|
|
|
"""
|
|
|
|
|
type = "bool"
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
if self.Get('cl_flash_set') == 'on':
|
|
|
|
|
isoimage = self.Get('cl_builder_image_filename')
|
|
|
|
|
var = VariableClBuilderImageFilename
|
|
|
|
|
if (isoimage.startswith(var.flash_base_dn) or
|
|
|
|
|
isoimage.startswith(var.flash_iso_base_dn)):
|
|
|
|
|
return "on"
|
|
|
|
|
return "off"
|
|
|
|
|