raise OptionValueError(_("Option %(opt)s: invalid boolean value: %(value)r") % mapping)
def _check_string(option, opt, value):
- if len(value) > 2 and value.startswith("--"):
- mapping = {"opt": opt, "value": value}
- raise OptionValueError(_("Option %(opt)s: invalid string value: %(value)r") % mapping)
- else:
- return value
+ #if len(value) > 2 and value.startswith("--"):
+ #mapping = {"opt": opt, "value": value}
+ #raise OptionValueError(_("Option %(opt)s: invalid string value: %(value)r") % mapping)
+ # else:
+ return value
# Creates a new Option class that supports several new attributes:
# - required: any option with this attribute must be supplied or an exception
cpiomountdir = os.path.join(self._instroot, item['mountpoint'].lstrip('/'))
os.chdir(cpiomountdir)
# find . | cpio --create --'format=newc' | gzip > ../ramdisk.img
- runner.show('find . | cpio --create --format=%s | gzip > %s' % (item['cpioopts'], imgfile))
+ runner.show('find . | cpio --create %s | gzip > %s' % (item['cpioopts'], imgfile))
shutil.rmtree(cpiomountdir, ignore_errors=True)
fs.makedirs(cpiomountdir)
os.chdir(oldoutdir)
runner.show('ls -al %s' % self._imgdir)
if item['fstype'] == "ext4":
- runner.show('/sbin/tune2fs -O ^huge_file,extents,uninit_bg %s '
+ if not item['cpioopts']:
+ runner.show('/sbin/tune2fs -O ^huge_file,extents,uninit_bg %s '
% imgfile)
- runner.quiet(["/sbin/e2fsck", "-f", "-y", imgfile])
+ runner.quiet(["/sbin/e2fsck", "-f", "-y", imgfile])
self.image_files.setdefault('partitions', {}).update(
{item['mountpoint']: item['label']})
if self.compress_image: