[oe-commits] Phil Blundell : gcc-runtime: Avoid error when trying to remove nonexistent directories
git at git.openembedded.org
git at git.openembedded.org
Wed May 22 16:08:54 UTC 2013
Module: openembedded-core.git
Branch: dylan
Commit: 78879d1583d082e0d08253ebefbd8c2a288db01c
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=78879d1583d082e0d08253ebefbd8c2a288db01c
Author: Phil Blundell <pb at pbcl.net>
Date: Thu May 2 13:19:25 2013 +0100
gcc-runtime: Avoid error when trying to remove nonexistent directories
If we didn't build libgomp then we won't have installed anything into
${infodir} or ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude. Check
whether those directories exist before trying to remove them, else we
will lose.
(From OE-Core master rev: 507e14ecdc5b4ff2ee7f1128d9f30c2948e10d5a)
Signed-off-by: Phil Blundell <philb at gnu.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
.../recipes-devtools/gcc/gcc-configure-runtime.inc | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index a9f77d9..977a98a 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -43,8 +43,12 @@ do_install () {
oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
done
rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
- rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
- rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
+ fi
+ if [ -d ${D}${infodir} ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ fi
chown -R root:root ${D}
}
More information about the Openembedded-commits
mailing list