meta-toolchain: Run rmdir only if empty dirs are actually found.
authorAntonio Ospite <ospite@studenti.unina.it>
Sat, 13 Feb 2010 09:32:37 +0000 (09:32 +0000)
committerStefan Schmidt <stefan@datenfreihafen.org>
Sun, 14 Feb 2010 13:07:22 +0000 (14:07 +0100)
Prevent a failure in do_populate_sdk when there are no empty
directories:
  /bin/rmdir: missing operand
  Try `/bin/rmdir --help' for more information.

See also http://tinderbox.openembedded.net/packages/478437/

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
recipes/meta/meta-toolchain.bb

index a8c27ec..3169425 100644 (file)
@@ -67,7 +67,7 @@ do_populate_sdk() {
        rm -Rf ${SDK_OUTPUT}/usr/lib
 
        # Clean up empty directories from excluded packages
-       find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -0 /bin/rmdir
+       find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -r0 /bin/rmdir
 
        install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}
        install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/