From 4bc377cd443cb5fbf52b9c533f5f078ead80258c Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 30 Jun 2022 15:38:50 -0700 Subject: [PATCH] Attempt to resolve RLBT#0000133 --- iso/empanadas/empanadas/scripts/sync_from_peridot_test.py | 2 ++ iso/empanadas/empanadas/templates/README.tmpl | 6 ++++++ iso/empanadas/empanadas/util/dnf_utils.py | 6 ++++-- iso/empanadas/empanadas/util/iso_utils.py | 7 +++++++ iso/empanadas/empanadas/util/shared.py | 3 ++- iso/empanadas/pyproject.toml | 4 ++-- 6 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 iso/empanadas/empanadas/templates/README.tmpl diff --git a/iso/empanadas/empanadas/scripts/sync_from_peridot_test.py b/iso/empanadas/empanadas/scripts/sync_from_peridot_test.py index 5057753..7678f33 100755 --- a/iso/empanadas/empanadas/scripts/sync_from_peridot_test.py +++ b/iso/empanadas/empanadas/scripts/sync_from_peridot_test.py @@ -2,6 +2,7 @@ import argparse +import empanadas from empanadas.common import * from empanadas.util import Checks from empanadas.util import RepoSync @@ -16,3 +17,4 @@ a = RepoSync(rlvars, config, major="9", repo="BaseOS", parallel=True, ignore_deb def run(): print(rlvars.keys()) print(rlvars) + print(empanadas.__version__) diff --git a/iso/empanadas/empanadas/templates/README.tmpl b/iso/empanadas/empanadas/templates/README.tmpl new file mode 100644 index 0000000..726ab3a --- /dev/null +++ b/iso/empanadas/empanadas/templates/README.tmpl @@ -0,0 +1,6 @@ +These set of repositories (or "compose") is for {{ fullname }} and was generated +using Empanadas {{ version }} from the SIG/Core Toolkit. + +As this is not a traditional compose, there will be things that you might be +expecting and do not see, or not expecting and do see.. While we attempted to +recreate a lot of those elements, it's not perfect. diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index 58480db..ba38234 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -930,7 +930,9 @@ class RepoSync: e.strerror ) - # Create metadata here? + # Create metadata here + # Create COMPOSE_ID here (this doesn't necessarily match anything, it's + # just an indicator) self.log.info( '[' + Color.BOLD + Color.GREEN + 'INFO' + Color.END + '] ' + @@ -999,7 +1001,7 @@ class RepoSync: self.shortname, self.fullversion, a, - self.timestamp, + int(self.timestamp), repo_name ) else: diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index ef1e283..86399cc 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -723,6 +723,12 @@ class IsoBuild: repo ) + if not os.path.exists(pathway): + self.log.error( + '[' + Color.BOLD + Color.RED + 'FAIL' + Color.END + '] ' + + 'Repo and Image variant do NOT match' + ) + if not force_unpack: found_files = [] for y in ArchCheck.archfile[arch]: @@ -747,6 +753,7 @@ class IsoBuild: '[' + Color.BOLD + Color.GREEN + 'INFO' + Color.END + '] ' + 'Copying images and data for ' + repo + ' ' + arch ) + try: shutil.copytree(src_to_image, pathway, copy_function=shutil.copy2, dirs_exist_ok=True) except: diff --git a/iso/empanadas/empanadas/util/shared.py b/iso/empanadas/empanadas/util/shared.py index 7524c2f..085fabb 100644 --- a/iso/empanadas/empanadas/util/shared.py +++ b/iso/empanadas/empanadas/util/shared.py @@ -117,7 +117,8 @@ class Shared: "%s" % timestamp, "%s" % fullname, "%s" % arch, - "ALL" + "ALL", + "" ] with open(file_path, "w+") as f: diff --git a/iso/empanadas/pyproject.toml b/iso/empanadas/pyproject.toml index fb25ee5..82ea835 100644 --- a/iso/empanadas/pyproject.toml +++ b/iso/empanadas/pyproject.toml @@ -1,8 +1,8 @@ [tool.poetry] name = "empanadas" -version = "0.1.0" +version = "0.2.0" description = "hand crafted ISOs with love and spice" -authors = ["Louis Abel ", "Neil Hanlon "] +authors = ["Louis Abel ", "Neil Hanlon "] [tool.poetry.dependencies] python = ">=3.7,<4"