]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
harfbuzz: remove bindir only if it exists
authorPetr Kubizňák <kubiznak@2n.com>
Wed, 4 Jan 2023 11:45:55 +0000 (12:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Jan 2023 23:07:39 +0000 (23:07 +0000)
In some scenarios (e.g. when "glib" removed from PACKAGECONFIG),
"${D}${bindir}" might not exist which caused `rmdir` to fail.

Signed-off-by: Petr Kubizňák <kubiznak@2n.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/harfbuzz/harfbuzz_6.0.0.bb

index 46ab6a4ca81167913d816dc424b84fb377928af3..ae54bad643f9ddabcba723d2c4e9dc5ec08b56c0 100644 (file)
@@ -30,9 +30,9 @@ PACKAGES =+ "${PN}-icu ${PN}-icu-dev ${PN}-subset"
 LEAD_SONAME = "libharfbuzz.so"
 
 do_install:append() {
-    # If no tools are installed due to PACKAGECONFIG then this directory is
-    #still installed, so remove it to stop packaging wanings.
-    rmdir --ignore-fail-on-non-empty ${D}${bindir}
+    # If no tools are installed due to PACKAGECONFIG then this directory might
+    # still be installed, so remove it to stop packaging warnings.
+    [ ! -d ${D}${bindir} ] || rmdir --ignore-fail-on-non-empty ${D}${bindir}
 }
 
 FILES:${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"