# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import os
+import sys
import glob
import shutil
'f2fsopts': part.f2fsopts or None,
'vdfsopts': part.vdfsopts or None,
'squashfsopts': part.squashfsopts or None,
+ 'squashfsopts2': part.squashfsopts2 or None,
'cpioopts': part.cpioopts or None,
'loop': None, # to be created in _mount_instroot
'uuid': part.uuid or None,
else:
runner.show("%s " % args)
+ if item['squashfsopts2']:
+ squashfsopts2=int(item['squashfsopts2']) * 1024 * 1024
+ imgsize = os.stat(self._imgdir+"/"+item['label']+fs_suffix).st_size
+ if imgsize > squashfsopts2:
+ msger.error("squashfs img size is too large (%d > %d)" % (imgsize, squashfsopts2))
+ sys.exit()
+
if item['aft_fstype'] == "vdfs":
##FIXME temporary code - replace this with fs.mkvdfs()
if item['vdfsopts']:
self.exclude_image = kwargs.get("exclude_from_image", False)
self.vdfsopts = kwargs.get("vdfsopts", None)
self.squashfsopts = kwargs.get("squashfsopts", None)
+ self.squashfsopts2 = kwargs.get("squashfsopts2", None)
self.cpioopts = kwargs.get("cpioopts", None)
self.no_shrink = kwargs.get("no_shrink", False)
self.init_expand = kwargs.get("init_expand", False)
retval += " --vdfsoptions=%s" % self.vdfsopts
if self.squashfsopts:
retval += " --squashfsoptions=%s" % self.squashfsopts
+ if self.squashfsopts2:
+ retval += " --squashfsoptions2=%s" % self.squashfsopts2
if self.cpioopts:
retval += " --cpiooptions=%s" % self.cpioopts
if self.no_shrink:
default=None)
op.add_option("--squashfsoptions", type="string", action="store", dest="squashfsopts",
default=None)
+ op.add_option("--squashfsoptions2", type="string", action="store", dest="squashfsopts2",
+ default=None)
op.add_option("--cpiooptions", type="string", action="store", dest="cpioopts",
default=None)
op.add_option("--no-shrink", action="store_true", dest="no_shrink", default=False)