1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

Fix the logic for skipping _repo_setup_updates

Just checking for the package update list is wrong in a couple of
ways:

1. It goes wrong for child tests that inherit the main disk from
the parent test, but not the second disk where the actual update
repo lives. They'll have the package list, but not the repo. So
we should test for both the package list and the repo dir.

2. It goes wrong for side tag tests, because we don't write a
package list (or create an update repo) on that path. So on that
path let's check whether we already created the repo definition
we use on that path.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-03-13 10:17:44 -07:00
parent 28b2d02b5f
commit b8fddfa265

View File

@ -633,12 +633,20 @@ sub setup_repos {
sub _repo_setup_updates { sub _repo_setup_updates {
# Appropriate repo setup steps for testing a Bodhi update # Appropriate repo setup steps for testing a Bodhi update
my $tag = get_var("TAG");
# Check if we already ran, bail if so # Check if we already ran, bail if so
return unless script_run "test -f /mnt/updatepkgs.txt"; if ($tag) {
# for TAG case, check for the repo file
return unless script_run "test -f /etc/yum.repos.d/openqa-testtag.repo";
}
else {
# otherwise, run unless both the update repo and the update
# package list are present already
return unless (script_run "test -d /mnt/update_repo/repodata && test -f /mnt/updatepkgs.txt");
}
my $version = get_var("VERSION"); my $version = get_var("VERSION");
my $currrel = get_var("CURRREL", "0"); my $currrel = get_var("CURRREL", "0");
my $arch = get_var("ARCH"); my $arch = get_var("ARCH");
my $tag = get_var("TAG");
# this can be used for debugging repo config if something is wrong # this can be used for debugging repo config if something is wrong
# unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') { # unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') {
# upload_logs "/etc/yum.repos.d/yumreposd.tar.gz"; # upload_logs "/etc/yum.repos.d/yumreposd.tar.gz";