cairo: Do not try to remove nonexistent directories
PATCH 1/1 cairo: Do not try to remove nonexistent directories
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.
--- meta/recipes-graphics/cairo/cairo_1.16.0.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/cairo/cairo_1.16.0.bb +4 -2
@@ -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"
Quoted 8 lines · Peter Kjellerstedt
Commit
0e1f8fa0(bitbake.conf: propagate 'opengl'DISTRO_FEATUREto native/nativesdk from target) changed the default PACKAGECONFIG for native and nativesdk so that it becomes empty unless "x11" is inDISTRO_FEATURESsince "trace" was also removed (propbably unintentionally). This highlighted than an empty PACKAGECONFIG would lead to a build failure since/usr/binis never created under these conditions, but the recipe still tried to remove it.
looking at above commit, its doing
PACKAGECONFIG_class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d
there are cases where we build firmware's with and without x11 in distro
features, now we have another set of native and nativesdk packages to build. Scratch builds from release to release are getting longer and longer, using shared state hides the problem, but first build experience is quite not as good.
Quoted 26 lines
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/recipes-graphics/cairo/cairo_1.16.0.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)meta/recipes-graphics/cairo/cairo_1.16.0.bb +4
-2@@ -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"