From dc522e3f4a97d5debea33d916a95af7bba07676b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 16 Jul 2024 10:33:51 -0700 Subject: [PATCH] test test: fiddle with excludepkgs Signed-off-by: Adam Williamson --- lib/utils.pm | 5 +++++ tests/_live_build.pm | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/utils.pm b/lib/utils.pm index 9fee13fd..a4729c65 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -720,6 +720,11 @@ sub _repo_setup_updates { } else { setup_repos(configs => 1); + # block the update packages in main repo dnf and mock configs + assert_script_run 'sed -i -e "s,name=,excludepkgs=`sed -e s/ /,/g /mnt/updatepkgnames.txt`\nname=,g" /etc/mock/templates/fedora*'; + assert_script_run 'sed -i -e "s,name=,excludepkgs=`sed -e s/ /,/g /mnt/updatepkgnames.txt`\nname=,g" /etc/yum.repos.d/fedora*.repo'; + upload_logs "/etc/mock/templates/fedora-rawhide.tpl"; + upload_logs "/etc/yum.repos.d/fedora.repo"; # run an update now, except for upgrade or install tests, # where the updated packages should have been installed # already and we want to fail if they weren't, or CANNED diff --git a/tests/_live_build.pm b/tests/_live_build.pm index f94a3e92..ba4bf7d5 100644 --- a/tests/_live_build.pm +++ b/tests/_live_build.pm @@ -69,6 +69,8 @@ sub run { assert_script_run 'git clone https://pagure.io/fedora-kickstarts.git'; assert_script_run 'cd fedora-kickstarts'; assert_script_run "git checkout ${branch}"; + # exclude update packages in the main repo definition + assert_script_run 'sed -i -e "s,--name=,--excludepkgs=`sed -e s/ /,/g /mnt/updatepkgnames.txt` --name=,g" ' . $repoks; # now add the side, tag or COPR repo to the appropriate repo ks assert_script_run 'echo "repo --name=advisory --baseurl=file:///mnt/update_repo" >> ' . $repoks unless ($tag || $copr); assert_script_run 'echo "repo --name=openqa-testtag --baseurl=' . get_var("UPDATE_OR_TAG_REPO") . '" >> ' . $repoks if ($tag || $copr);