From 5fda734892fc62f38a9b136709b51a1b60df384b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 26 Jun 2024 15:16:22 -0700 Subject: [PATCH] tag/copr updatepkgs.txt generation: filter arches If the repo has source packages in it, we get a badly-formed updatepkgs.txt that breaks updvercheck. So let's filter to only packages of the target arch and noarch. Signed-off-by: Adam Williamson --- lib/utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.pm b/lib/utils.pm index d95c50a5..b42cfeac 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -580,7 +580,7 @@ sub setup_repos { # avoids some more. grep . filters empty lines, which we get # with dnf < 5 since this queryformat template ends with \n for # dnf >= 5 - assert_script_run 'dnf -q --disablerepo=* --enablerepo=openqa-testtag repoquery --qf "%{SOURCERPM} %{NAME} %{EPOCH} %{VERSION} %{RELEASE}\n" | sort -u | grep -v testtag | grep . > /mnt/updatepkgs.txt'; + assert_script_run 'dnf -q --disablerepo=* --enablerepo=openqa-testtag repoquery --qf "%{SOURCERPM} %{NAME} %{EPOCH} %{VERSION} %{RELEASE}\n" --arch=' . $arch . ',noarch | sort -u | grep -v testtag | grep . > /mnt/updatepkgs.txt'; # the | xargs here is a wacky trick that converts newlines to # spaces - unlike rpm, dnf < 5 always puts every package on a new # line, which we don't want here