From 7555dccf2174ef228f41e506904cf70a4c9c6314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Thu, 26 Nov 2009 15:39:46 +0000 Subject: don't try finding debug files in buildroot when there's none --- find-debuginfo.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/find-debuginfo.sh b/find-debuginfo.sh index d6d539f..30bb311 100755 --- a/find-debuginfo.sh +++ b/find-debuginfo.sh @@ -50,11 +50,15 @@ do fi done -mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug -cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) -# stupid cpio creates new directories in mode 0700, fixup -find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx -find ${RPM_BUILD_ROOT}/usr/src/debug -type f -print0 | xargs -0 -r chmod a+r - -find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE -find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE +[[ -d ${debugdir} ]] && \ +find ${debugdir} -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE + +if [ -s $SOURCEFILE ]; then + mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug + cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) + # stupid cpio creates new directories in mode 0700, fixup + find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx + find ${RPM_BUILD_ROOT}/usr/src/debug -type f -print0 | xargs -0 -r chmod a+r + + find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE +fi -- cgit v1.2.1