diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2009-11-26 15:39:46 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2009-11-26 15:39:46 +0000 |
commit | 7555dccf2174ef228f41e506904cf70a4c9c6314 (patch) | |
tree | d16e804b50067df06adbef238bec2cc2b128ef1b | |
parent | 96e3e8cbf1aedecb82d8dd80ffa256fc6c58f885 (diff) | |
download | rpm-setup-7555dccf2174ef228f41e506904cf70a4c9c6314.tar rpm-setup-7555dccf2174ef228f41e506904cf70a4c9c6314.tar.gz rpm-setup-7555dccf2174ef228f41e506904cf70a4c9c6314.tar.bz2 rpm-setup-7555dccf2174ef228f41e506904cf70a4c9c6314.tar.xz rpm-setup-7555dccf2174ef228f41e506904cf70a4c9c6314.zip |
don't try finding debug files in buildroot when there's none
-rwxr-xr-x | find-debuginfo.sh | 20 |
1 files 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 |