]> code.ossystems Code Review - openembedded-core.git/commitdiff
cairo: Do not try to remove nonexistent directories
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 2 Jun 2020 09:06:05 +0000 (11:06 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Jun 2020 14:25:55 +0000 (15:25 +0100)
Commit 0e1f8fa0 (bitbake.conf: propagate 'opengl' DISTRO_FEATURE to
native/nativesdk from target) changed the default PACKAGECONFIG for
native and nativesdk so that it becomes empty unless "x11" is in
DISTRO_FEATURES since "trace" was also removed (propbably
unintentionally). This highlighted than an empty PACKAGECONFIG would
lead to a build failure since /usr/bin is never created under these
conditions, but the recipe still tried to remove it.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/cairo/cairo_1.16.0.bb

index 092c77b826d28b5e17e9d48a463ce6b748acc03a..195a66b37d9854bf46eb137bf3e7efd49755a04b 100644 (file)
@@ -70,8 +70,10 @@ do_install_append () {
        rm -rf ${D}${libdir}/cairo/cairo-sphinx*
        rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
        rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
-       rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
-       rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
+       [ ! -d ${D}${bindir} ] ||
+               rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
+       [ ! -d ${D}${libdir}/cairo ] ||
+               rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
 }
 
 PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"