container build: use transient containers for advisory_check

using podman run leaves containers and/or images lying around; if
the thing being tested is big enough, we can wind up with enough
that podman just stops working (I saw this while testing the
python 3.13 side tag). To avoid this, use podman run --rm, which
clears up the container/image after the command is run.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-06-19 12:41:52 -07:00
parent d726d73733
commit 3ca2598a01
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ sub run {
my $imgspec = "localhost/fedora:${mockver}";
validate_script_output "podman run ${imgspec} echo Hello-World", sub { m/Hello-World/ };
# do advisory_check_nonmatching_packages inside the container
advisory_check_nonmatching_packages(wrapper => "podman run ${imgspec}");
advisory_check_nonmatching_packages(wrapper => "podman run --rm ${imgspec}");
# wipe the temp file so it doesn't interfere with the same check
# on the host
assert_script_run "rm -f /tmp/installedupdatepkgs.txt";