[PATCH 1/3] find-debuginfo: Refactor output directory

Michal Domonkos mdomonko@redhat.com
Wed Oct 29 15:11:53 GMT 2025


Separate the output directory path for the artifacts (*.list) from
$BUILDDIR so that we can make it configurable in the next commit.

No functional change.

Signed-off-by: Michal Domonkos <mdomonko@redhat.com>
---
 scripts/find-debuginfo.in | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
index 40cd182..8bb688a 100755
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -330,21 +330,23 @@ fi
 
 $quiet || echo "find-debuginfo: starting" 2>&1
 
+OUTDIR=$BUILDDIR
+
 i=0
 while ((i < nout)); do
-  outs[$i]="$BUILDDIR/${outs[$i]}"
+  outs[$i]="$OUTDIR/${outs[$i]}"
   l=''
   for f in ${lists[$i]}; do
-    l="$l $BUILDDIR/$f"
+    l="$l $OUTDIR/$f"
   done
   lists[$i]=$l
   ((++i))
 done
 
-LISTFILE="$BUILDDIR/$out"
-SOURCEFILE="$BUILDDIR/debugsources.list"
-LINKSFILE="$BUILDDIR/debuglinks.list"
-ELFBINSFILE="$BUILDDIR/elfbins.list"
+LISTFILE="$OUTDIR/$out"
+SOURCEFILE="$OUTDIR/debugsources.list"
+LINKSFILE="$OUTDIR/debuglinks.list"
+ELFBINSFILE="$OUTDIR/elfbins.list"
 
 > "$SOURCEFILE"
 > "$LISTFILE"
@@ -888,7 +890,7 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" ] || [ -d "${RPM_BUILD_ROOT}/usr/src" ]; the
 fi
 
 if [ -n "$srcout" ]; then
-  srcout="$BUILDDIR/$srcout"
+  srcout="$OUTDIR/$srcout"
   > "$srcout"
   if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
     (cd "${RPM_BUILD_ROOT}/usr"
-- 
2.51.1



More information about the Debugedit mailing list