Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error detection for zypper_call and add_suseconnect_product #10259

merged 3 commits into from May 14, 2020
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -189,6 +189,8 @@ sub add_suseconnect_product {
record_soft_failure 'bsc#1124318 - Fail to get module repo metadata - running the command again as a workaround';
assert_script_run("SUSEConnect -p $name/$version/$arch $params", $timeout);
} elsif ($result && !$retry) {
die "SUSEConnect failed activating module $name with exit code (see log output): $result.";

@@ -500,12 +500,21 @@ sub zypper_call {
# Retrying workarounds
my $ret;
my $search_conflicts = 'awk \'BEGIN {print "Processing conflicts - ",NR; group=0}
/Solverrun finished with an ERROR/,/statistics/{ print group"|",
$0; if ($0 ~ /statistics/ ){ print "EOL"; group++ }; }\'\
for (1 .. 5) {
$ret = script_run("zypper -n $command $printer; ( exit \${PIPESTATUS[0]} )", $timeout);
die "zypper did not finish in $timeout seconds" unless defined($ret);
if ($ret == 4) {
if (script_run('grep "Error code.*502" /var/log/zypper.log') == 0) {
die 'According to bsc#1070851 zypper should automatically retry internally. Bugfix missing for current product?';
} elsif (my $conflicts = script_output($search_conflicts)) {
record_info("Conflict", $conflicts, result => 'fail');
diag "Package conflicts found, not retrying anymore" if $conflicts;
next unless get_var('FLAVOR', '') =~ /-(Updates|Incidents)$/;