mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-11-30 12:56:01 +00:00
Make updatepkgs and updatepkgnames more precise for side tags
The way side tags work, every package in the distro is in the side tag repo, so updatepkgs and updatepkgnames end up huge. To fix this, we'll use a koji query for all packages that are actually in the side tag to generate updatepkgnames.txt, and then use that to filter the dnf command to generate updatepkgs.txt. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
1714c77620
commit
3fd367938b
23
lib/utils.pm
23
lib/utils.pm
@ -580,6 +580,7 @@ sub setup_repos {
|
|||||||
# according to the 'configs' arg
|
# according to the 'configs' arg
|
||||||
assert_script_run 'printf "[openqa-testtag]\nname=openqa-testtag\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '/\ncost=2000\nenabled=' . $args{configs} . '\ngpgcheck=0\npriority=1\n" > /etc/yum.repos.d/openqa-testtag.repo';
|
assert_script_run 'printf "[openqa-testtag]\nname=openqa-testtag\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '/\ncost=2000\nenabled=' . $args{configs} . '\ngpgcheck=0\npriority=1\n" > /etc/yum.repos.d/openqa-testtag.repo';
|
||||||
# write out the info files
|
# write out the info files
|
||||||
|
if ($copr) {
|
||||||
# -q avoids most progress spew into the output. grep -v testtag
|
# -q avoids most progress spew into the output. grep -v testtag
|
||||||
# avoids some more. grep . filters empty lines, which we get
|
# avoids some more. grep . filters empty lines, which we get
|
||||||
# with dnf < 5 since this queryformat template ends with \n for
|
# with dnf < 5 since this queryformat template ends with \n for
|
||||||
@ -591,6 +592,26 @@ sub setup_repos {
|
|||||||
# https://unix.stackexchange.com/a/110759
|
# https://unix.stackexchange.com/a/110759
|
||||||
assert_script_run 'dnf -q --disablerepo=* --enablerepo=openqa-testtag repoquery --qf "%{NAME} " | xargs > /mnt/updatepkgnames.txt';
|
assert_script_run 'dnf -q --disablerepo=* --enablerepo=openqa-testtag repoquery --qf "%{NAME} " | xargs > /mnt/updatepkgnames.txt';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# for side tags we use koji because the repo has *every* package
|
||||||
|
# on CANNED, we need to enter the toolbox
|
||||||
|
if (get_var("CANNED")) {
|
||||||
|
type_string "toolbox -y enter\n";
|
||||||
|
# this is simply to wait till we're in the toolbox
|
||||||
|
assert_script_run "true", 180;
|
||||||
|
}
|
||||||
|
assert_script_run 'dnf -y install koji', 300;
|
||||||
|
assert_script_run 'koji list-tagged ' . $tag . ' --latest | tail -n+3 | cut -d\' \' -f1 | rev | cut -d\'-\' -f3- | rev > /mnt/updatepkgnames.txt';
|
||||||
|
# exit the toolbox on CANNED
|
||||||
|
if (get_var("CANNED")) {
|
||||||
|
type_string "exit\n";
|
||||||
|
wait_serial "# ";
|
||||||
|
}
|
||||||
|
upload_logs '/mnt/updatepkgnames.txt';
|
||||||
|
# now *only* query those packages via dnf to generate updatepkgs
|
||||||
|
assert_script_run 'dnf -q --disablerepo=* --enablerepo=openqa-testtag repoquery `tr "\n" " " < /mnt/updatepkgnames.txt` --qf "%{SOURCERPM} %{NAME} %{EPOCH} %{VERSION} %{RELEASE}\n" --arch=' . $arch . ',noarch | sort -u | grep -v testtag | grep . > /mnt/updatepkgs.txt';
|
||||||
|
}
|
||||||
|
}
|
||||||
my @was = get_workarounds($args{version});
|
my @was = get_workarounds($args{version});
|
||||||
# bail if there are no workarounds:
|
# bail if there are no workarounds:
|
||||||
# * if we're in workarounds-only mode
|
# * if we're in workarounds-only mode
|
||||||
@ -1268,7 +1289,7 @@ sub advisory_check_nonmatching_packages {
|
|||||||
$timeout *= 2 if ($pkgs > 4800);
|
$timeout *= 2 if ($pkgs > 4800);
|
||||||
my $wrapper = $args{wrapper};
|
my $wrapper = $args{wrapper};
|
||||||
$rpmcmd = "$wrapper rpm" if ($wrapper);
|
$rpmcmd = "$wrapper rpm" if ($wrapper);
|
||||||
$timeout *= 2 if ($wrapper);
|
$timeout *= 3 if ($wrapper);
|
||||||
# this creates /tmp/installedupdatepkgs.txt as a sorted list of installed
|
# this creates /tmp/installedupdatepkgs.txt as a sorted list of installed
|
||||||
# packages with the same name as packages from the update, in the same form
|
# packages with the same name as packages from the update, in the same form
|
||||||
# as /mnt/updatepkgs.txt. The '--last | head -1' tries to handle the
|
# as /mnt/updatepkgs.txt. The '--last | head -1' tries to handle the
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user