From 34c8ee08ab008c56a0fb287cfb71ffb8ee71f638 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 14 Mar 2023 00:56:01 -0700 Subject: [PATCH] rely on original lorax manifest to build excludes --- iso/empanadas/empanadas/util/iso_utils.py | 25 ++++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index b9cefd8..18c96a4 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -1208,26 +1208,27 @@ class IsoBuild: arch ) - xorrs = '{}/xorriso-{}.txt'.format( + xorrs = '{}/xorriso-{}-{}.txt'.format( lorax_base_dir, + iso, arch ) + # Generate exclusion list/dict + boot_manifest = '{}/lorax/images/boot.iso.manifest'.format(lorax_base_dir) + + try: + with open(boot_manifest) as i: + ignores = set(line.lstrip("/").rstrip("\n") for line in i) + except Exception as e: + self.log.error(Color.FAIL + 'File was likely not found.') + raise SystemExit(e) + self._write_grafts( grafts, xorrs, files, - exclude=[ - "*/lost+found", - "*/boot.iso", - "*/boot.iso.manifest", - "EFI/*", - "images/*", - "isolinux/*", - "boot/*", - "ppc/*", - "generic.ins" - ] + exclude=ignores ) if self.iso_map['xorrisofs']: