Skip to content

Commit

Permalink
Merge pull request #19837 from rfan1/leap_qam_incidents
Browse files Browse the repository at this point in the history
Handle patch installation with all new packages
  • Loading branch information
foursixnine authored Aug 14, 2024
2 parents 07380a0 + 8e3a6f6 commit 0ee4e31
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/console/install_packages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ sub run {
zypper_call('in -l perl-solv perl-Data-Dump');
my $ex = script_run("~$username/data/lsmfip --verbose $packages > \$XDG_RUNTIME_DIR/install_packages.txt 2> /tmp/lsmfip.log");
upload_logs '/tmp/lsmfip.log';
die "lsmfip failed" if $ex;
if ($ex) {
if (script_output('tail -1 /tmp/lsmfip.log') =~ /was requested but nothing was installed/) {
record_info('The packages to be released are new ones', 'We do not need to install older packages before');
return;
}
die "lsmfip failed";
}
# make sure we install at least one package - otherwise this test is pointless
# better have it fail and let a reviewer check the reason
assert_script_run("test -s \$XDG_RUNTIME_DIR/install_packages.txt");
Expand Down
8 changes: 8 additions & 0 deletions tests/console/qam_zypper_patch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ use serial_terminal 'select_serial_terminal';
sub run {
select_serial_terminal;

if (script_run("test -s \$XDG_RUNTIME_DIR/install_packages.txt") != 0) {
record_info('The packages to be released are new ones', 'We need to install them via zypper');
my $packages = get_var("INSTALL_PACKAGES");
script_run("echo $packages > \$XDG_RUNTIME_DIR/install_packages.txt");
assert_script_run("xargs --no-run-if-empty zypper -n in -l < \$XDG_RUNTIME_DIR/install_packages.txt", 1400);
return;
}

# NVIDIA repo needs new signing key, see poo#163094
my $sign_key = get_var('BUILD') =~ /openSUSE-repos/ ? '--gpg-auto-import-keys' : '';
zypper_call("$sign_key in -l -t patch " . get_var('INCIDENT_PATCH'), exitcode => [0, 102, 103], timeout => 1400);
Expand Down

0 comments on commit 0ee4e31

Please sign in to comment.