Use xorriso instead of isoinfo when createiso_use_xorrisofs is enabled

Update get_mkisofs_cmd in createiso.py file in order to prevent using
default value. With this change it is possible to enable xorriso format

Jira: RHELCMP-6325

Signed-off-by: Ozan Unsal <ounsal@redhat.com>
This commit is contained in:
Ozan Unsal 2021-08-30 15:30:28 +02:00 committed by lsedlar
parent 7c3e8d4276
commit 3d9335e90e
2 changed files with 17 additions and 6 deletions

View File

@ -76,6 +76,7 @@ def make_image(f, opts):
volid=opts.volid, volid=opts.volid,
exclude=["./lost+found"], exclude=["./lost+found"],
graft_points=opts.graft_points, graft_points=opts.graft_points,
use_xorrisofs=opts.use_xorrisofs,
**mkisofs_kwargs **mkisofs_kwargs
) )
emit(f, cmd) emit(f, cmd)
@ -97,7 +98,7 @@ def run_isohybrid(f, opts):
def make_manifest(f, opts): def make_manifest(f, opts):
emit(f, iso.get_manifest_cmd(opts.iso_name)) emit(f, iso.get_manifest_cmd(opts.iso_name, opts.use_xorrisofs))
def make_jigdo(f, opts): def make_jigdo(f, opts):

View File

@ -255,11 +255,21 @@ def get_isohybrid_cmd(iso_path, arch):
return cmd return cmd
def get_manifest_cmd(iso_name): def get_manifest_cmd(iso_name, xorriso=False):
return "isoinfo -R -f -i %s | grep -v '/TRANS.TBL$' | sort >> %s.manifest" % ( if xorriso:
shlex_quote(iso_name), return """xorriso -dev %s --find |
shlex_quote(iso_name), tail -n+2 |
) tr -d "'" |
cut -c2- |
sort >> %s.manifest""" % (
shlex_quote(iso_name),
shlex_quote(iso_name),
)
else:
return "isoinfo -R -f -i %s | grep -v '/TRANS.TBL$' | sort >> %s.manifest" % (
shlex_quote(iso_name),
shlex_quote(iso_name),
)
def get_volume_id(path): def get_volume_id(path):