mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-21 02:08:29 +00:00
Handle update build not having any packages for target arch
openQA sometimes winds up testing an update that doesn't have any packages for x86_64 (or aarch64). The most common case is s390utils, which is on the critpath but only has packages for s390x. I would ideally like to skip scheduling entirely if the update has no packages for the arch we're scheduling on, but sadly that involves using the Koji API which is XML-RPC and I don't really want to deal with that again. This deals with it at the test level instead, by checking the error message if `koji download-build` fails and carrying on if it's the "no packages for this arch" error. That means if the update has no packages at all for our arch we're not really testing anything, but that's better than a bunch of false failures, I guess. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
ea0dc63fc3
commit
1fdf7cd567
@ -543,7 +543,13 @@ sub _repo_setup_updates {
|
||||
if (get_var("ADVISORY_NVRS")) {
|
||||
# regular update case
|
||||
foreach my $nvr (split(/ /, get_var("ADVISORY_NVRS"))) {
|
||||
assert_script_run "koji download-build --arch=" . get_var("ARCH") . " --arch=noarch $nvr", 600;
|
||||
if (script_run "koji download-build --arch=" . get_var("ARCH") . " --arch=noarch $nvr 2> download.log", 600) {
|
||||
# if the error was because the build has no packages
|
||||
# for our arch, that's okay, skip it. otherwise, die
|
||||
if (script_run "grep 'No .*available for $nvr' download.log") {
|
||||
die "koji download-build failed!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif (get_var("KOJITASK")) {
|
||||
|
Loading…
Reference in New Issue
Block a user