mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +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:
parent
28b2d02b5f
commit
b8fddfa265
12
lib/utils.pm
12
lib/utils.pm
@ -633,12 +633,20 @@ sub setup_repos {
|
||||
|
||||
sub _repo_setup_updates {
|
||||
# Appropriate repo setup steps for testing a Bodhi update
|
||||
my $tag = get_var("TAG");
|
||||
# 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 $currrel = get_var("CURRREL", "0");
|
||||
my $arch = get_var("ARCH");
|
||||
my $tag = get_var("TAG");
|
||||
# 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') {
|
||||
# upload_logs "/etc/yum.repos.d/yumreposd.tar.gz";
|
||||
|
Loading…
Reference in New Issue
Block a user