Blame finddebuginfo-check-res-file.patch

344f55
From a20edbb561f74ba608c0aa36be637e7245e596b5 Mon Sep 17 00:00:00 2001
344f55
From: ggardet <guillaume.gardet@opensuse.org>
344f55
Date: Fri, 9 Oct 2020 13:10:09 +0200
344f55
Subject: [PATCH] Do not fail if there is no "$temp"/res.* file
344f55
344f55
find-debuginfo is multi-threaded and rpm runs
344f55
scripts usually with "-e" to abort on error.
344f55
If the debug-splitting tool fails, that job will abort.
344f55
But if you have X files that are problematic in the tree,
344f55
and you have X or less jobs, find-debuginfo will abort
344f55
as no single res.$number has been written.
344f55
But if you have more than X jobs, the build will succeed,
344f55
which makes the whole process random.
344f55
This commit remove this randomness.
344f55
344f55
--- scripts/find-debuginfo.sh.orig
344f55
+++ scripts/find-debuginfo.sh
344f55
@@ -498,6 +498,7 @@ else
344f55
     wait
344f55
   )
344f55
   for f in "$temp"/res.*; do
344f55
+    test -f "$f" || continue
344f55
     res=$(< "$f")
344f55
     if [ "$res" !=  "0" ]; then
344f55
       exit 1