From 05587ac278fc2d0204cd10439274acbad6e0112b Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Mon, 30 Jan 2023 20:40:22 +0000 Subject: Fix some forever retries An error was not set when failing in %prep or %generate_buildrequires while trying to generate dynamic buildrequires. This causes iurt to assume it's a retriable install_deps_failure. Set the failure to build_failure when what fails is rpmbuild -br rather than installing the packages. --- NEWS | 3 +++ lib/Iurt/Urpmi.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f6310bf..0092584 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ - Add some tests checking the syntax of iurt/ulri/emi as the main scripts are not covered by test. - ulri: Fix syntax +- iurt: Fix build system retrying forever when rpmbuild -br fails to compute + dynamic BuildRequires, for example because some BuildRequires used in %prep + are missing. 0.8.1 - iurt: Fix getting a retriable install_deps_failure instead of missing_dep diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 49025d8..53d0756 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -584,7 +584,6 @@ sub install_dynamic_buildrequires { use_iurt_root_command => 1, hash => "generatebuildrequires_$srpm" ); - return 1 if $ret; # Unfortunately iurt_root_command hides the original error code so @@ -611,6 +610,7 @@ sub install_dynamic_buildrequires { } else { # This was a failure for another reason, no point retrying plog('ERROR', "Failed to generate dynamic BuildRequires."); + $run->{status}{$srpm} = 'build_failure'; return 0; } } -- cgit v1.2.1