Support debugsource subpackages
authorMichael Schroeder <mls@suse.de>
Tue, 28 Mar 2017 12:21:40 +0000 (14:21 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 11 May 2017 13:13:14 +0000 (16:13 +0300)
This can be enabled by setting the _debugsource_packages macro.

scripts/find-debuginfo.sh

index 1ebc159bb3d9c5e3bc2142731f32053349f3948d..aaf4c7561255b098e46bdac07eb0afb55cdc2bd9 100755 (executable)
@@ -4,6 +4,7 @@
 #
 # Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] [-m] [-i] [-n]
 #                         [-o debugfiles.list]
+#                         [-S debugsourcefiles.list]
 #                         [--run-dwz] [--dwz-low-mem-die-limit N]
 #                         [--dwz-max-die-limit N]
 #                         [--build-id-seed VERSION-RELEASE]
@@ -79,6 +80,7 @@ n_jobs=1
 
 BUILDDIR=.
 out=debugfiles.list
+srcout=
 nout=0
 while [ $# -gt 0 ]; do
   case "$1" in
@@ -147,6 +149,10 @@ while [ $# -gt 0 ]; do
   -j*)
     n_jobs=${1#-j}
     ;;
+  -S)
+    srcout=$2
+    shift
+    ;;
   *)
     BUILDDIR=$1
     shift
@@ -512,10 +518,19 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then
 
   (cd "${RPM_BUILD_ROOT}/usr"
    test ! -d lib/debug || find lib/debug ! -type d
-   test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1
+   test ! -d src/debug -o -n "$srcout" || find src/debug -mindepth 1 -maxdepth 1
   ) | sed 's,^,/usr/,' >> "$LISTFILE"
 fi
 
+if [ -n "$srcout" ]; then
+  > "$srcout"
+  if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
+    (cd "${RPM_BUILD_ROOT}/usr"
+     find src/debug -mindepth 1 -maxdepth 1
+    ) | sed 's,^,/usr/,' >> "$srcout"
+  fi
+fi
+
 # Append to $1 only the lines from stdin not already in the file.
 append_uniq()
 {
This page took 0.062246 seconds and 5 git commands to generate.