From 3d9335e90ebc7eb63721f4ca689c88fa15cca6a2 Mon Sep 17 00:00:00 2001 From: Ozan Unsal Date: Aug 31 2021 08:09:09 +0000 Subject: 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 --- diff --git a/pungi/createiso.py b/pungi/createiso.py index 1f7990d..cbd3fef 100644 --- a/pungi/createiso.py +++ b/pungi/createiso.py @@ -76,6 +76,7 @@ def make_image(f, opts): volid=opts.volid, exclude=["./lost+found"], graft_points=opts.graft_points, + use_xorrisofs=opts.use_xorrisofs, **mkisofs_kwargs ) emit(f, cmd) @@ -97,7 +98,7 @@ def run_isohybrid(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): diff --git a/pungi/wrappers/iso.py b/pungi/wrappers/iso.py index afbdf87..4cdbd3f 100644 --- a/pungi/wrappers/iso.py +++ b/pungi/wrappers/iso.py @@ -255,11 +255,21 @@ def get_isohybrid_cmd(iso_path, arch): return cmd -def get_manifest_cmd(iso_name): - return "isoinfo -R -f -i %s | grep -v '/TRANS.TBL$' | sort >> %s.manifest" % ( - shlex_quote(iso_name), - shlex_quote(iso_name), - ) +def get_manifest_cmd(iso_name, xorriso=False): + if xorriso: + return """xorriso -dev %s --find | + 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):