+
+ if item['aft_fstype'] in AFTER_MNT_FS.keys():
+ mountpoint = misc.mkdtemp()
+ ext4img = os.path.join(self._imgdir, item['name'])
+ runner.show('mount -t ext4 %s %s' % (ext4img, mountpoint))
+ runner.show('ls -al %s' % (mountpoint))
+# item['loop'].mount(None, 'not_create')
+# point_mnt = os.path.join(self._instroot, item['mountpoint'].lstrip('/'))
+
+ fs_suffix = AFTER_MNT_FS[item['aft_fstype']]
+ if item['aft_fstype'] == "squashfs":
+# fs.mksquashfs(mountpoint, self._outdir+"/"+item['label']+fs_suffix)
+ args = "mksquashfs " + mountpoint + " " + self._imgdir+"/"+item['label']+fs_suffix
+ if item['squashfsopts']:
+ squashfsopts=item['squashfsopts'].replace(',', ' ')
+ runner.show("mksquashfs --help")
+ runner.show("%s %s" % (args, squashfsopts))
+ else:
+ runner.show("%s " % args)
+
+ if item['aft_fstype'] == "vdfs":
+ ##FIXME temporary code - replace this with fs.mkvdfs()
+ if item['vdfsopts']:
+ vdfsopts=item['vdfsopts'].replace(',', ' ')
+ else:
+ vdfsopts="-i -z 1024M"
+
+ fullpathmkvdfs = "mkfs.vdfs" #find_binary_path("mkfs.vdfs")
+ runner.show("%s --help" % fullpathmkvdfs)
+# fs.mkvdfs(mountpoint, self._outdir+"/"+item['label']+fs_suffix, vdfsopts)
+ runner.show('%s %s -r %s %s' % (fullpathmkvdfs, vdfsopts, mountpoint, self._imgdir+"/"+item['label']+fs_suffix))
+
+ runner.show('umount %s' % mountpoint)
+# os.unlink(mountpoint)
+ runner.show('mv %s %s' % (self._imgdir+"/"+item['label']+fs_suffix, self._imgdir+"/"+item['label']+".img") )
+ runner.show('ls -al %s' % self._imgdir)
+