From 445588c276ee2b97a47ccf49523aabf0b73261fe Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 14 Feb 2024 08:34:30 -0800 Subject: [PATCH 1/2] dnfbase: Fix substitutions Branching for Fedora 40 revealed a problem with using substitutions in the GPG key name, @AdamWill fixed this by setting them on the Base object which appears to be the correct way to do it. Remove the per-repo kludge and set releasever and basearch on the Base variables so they are used everywhere. --- src/pylorax/dnfbase.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pylorax/dnfbase.py b/src/pylorax/dnfbase.py index 3987e4f76..6470b55dd 100644 --- a/src/pylorax/dnfbase.py +++ b/src/pylorax/dnfbase.py @@ -153,6 +153,10 @@ def sanitize_repo(repo): log.info("Using %s for module_platform_id", platform_id) conf.module_platform_id = platform_id + # Set variables used for substitutions + dnfbase.get_vars().set("releasever", releasever) + dnfbase.get_vars().set("basearch", basearch) + # Add .repo files if repos: reposdir = os.path.join(tempdir, "dnf.repos") @@ -210,14 +214,6 @@ def sanitize_repo(repo): return None log.info("Using repos: %s", ", ".join(r.get_id() for r in rq)) - # Add substitutions to all enabled repos - for r in rq: - # Substitutions used with the repo url - r.set_substitutions({ - "releasever": releasever, - "basearch": basearch, - }) - log.info("Fetching metadata...") try: sack.update_and_load_enabled_repos(False) From 55f8077e6649f7e4df6bf55c5306b87faa6d0149 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 16 Feb 2024 07:59:45 -0800 Subject: [PATCH 2/2] workflows: Switch to actions/checkout@v4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ffdcb6e94..e85ad55e4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Clone Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run lorax tests in podman run: make test-in-podman && cp .test-results/.coverage .coverage - name: Coveralls