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 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)