From 8a95c3f64e895fe5b2bbf4d4f7d2c5bc164ae729 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 29 Mar 2023 00:19:23 -0700 Subject: [PATCH] re-add replacement steps --- iso/empanadas/empanadas/util/iso_utils.py | 27 +++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index fef2e5b..4653822 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -1166,18 +1166,18 @@ class IsoBuild: # below is a pungi "buildinstall" thing that we don't do, but may # include as a feature if it ever happens. updatable_files = set(ArchCheck.boot_configs + ArchCheck.boot_images + ['.discinfo']) - #ignores = set() + ignores = set() updatables = set() try: with open(boot_manifest) as i: - ignores = set(line.lstrip("/").rstrip("\n") for line in i) - # for line in i: - # path = line.lstrip("/").rstrip("\n") - # if path in updatable_files: - # updatables.add(path) - # else: - # ignores.add(path) + # ignores = set(line.lstrip("/").rstrip("\n") for line in i) + for line in i: + path = line.lstrip("/").rstrip("\n") + if path in updatable_files: + updatables.add(path) + else: + ignores.add(path) except Exception as e: self.log.error(Color.FAIL + 'File was likely not found.') raise SystemExit(e) @@ -1266,14 +1266,13 @@ class IsoBuild: for zm in sorted(result, key=self._sorting): found = False replace = False - #for upda in update: - # if fnmatch(zm, upda): - # #if upda in zm: - # replace = True - # break + for upda in update: + if fnmatch(zm, upda): + print(f'updating: {zm} {upda}') + replace = True + break for excl in exclude: if fnmatch(zm, excl): - #if excl in zm: print(f'ignoring: {zm} {excl}') found = True break