From b37133143661a7dc26d27b245aed2692a5bdf668 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 14 Feb 2024 12:29:51 -0800 Subject: [PATCH] _ostree_build: handle change to repos in workstation-ostree-config The place where repos are defined changed on the F40+ branches of workstation-ostree-config, this handles both possibilities. Signed-off-by: Adam Williamson --- setup_repos.py | 4 ++-- tests/_ostree_build.pm | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/setup_repos.py b/setup_repos.py index 59b14b46..81f17de4 100755 --- a/setup_repos.py +++ b/setup_repos.py @@ -39,8 +39,8 @@ import sys # these are variables to make testing this script easier...change them # to /tmp for testing -WORKAROUNDS_DIR = "/mnt/workarounds_repo" -UPDATES_DIR = "/mnt/update_repo" +WORKAROUNDS_DIR = "/tmp/workarounds_repo" +UPDATES_DIR = "/tmp/update_repo" UPDATES_FILE_PATH = "/mnt" diff --git a/tests/_ostree_build.pm b/tests/_ostree_build.pm index 022a79aa..0aef1c5b 100644 --- a/tests/_ostree_build.pm +++ b/tests/_ostree_build.pm @@ -51,7 +51,12 @@ sub run { $repl .= '\n - koji-rawhide' if ($version eq $rawrel); $repl .= '\n - advisory' unless ($tag); $repl .= '\n - openqa-testtag' if ($tag); + # Up to Fedora 39, repo definitions are in the subvariant config... assert_script_run 'sed -i -e "s,repos:,' . $repl . ',g" fedora-' . $lcsubv . '.yaml'; + # From Fedora 40 onwards, they're in the common config. Let's just + # unconditionally sub both, as this is harmless when the file does + # not have 'repos:' in it + assert_script_run 'sed -i -e "s,repos:,' . $repl . ',g" fedora-common-ostree.yaml'; # change the ref name to a custom one (so we can test rebasing to # the 'normal' ref later) assert_script_run 'sed -i -e "s,ref: fedora/,ref: fedora-openqa/,g" fedora-' . $lcsubv . '.yaml';