Patchwork [24/28] tar: fix build

login
register
mail settings
Submitter Nitin A Kamble
Date May 3, 2012, 6:15 p.m.
Message ID <15d46e0a01a07afdc7cf6ef70894e78a3d5db2f5.1336068854.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/27037/
State New
Headers show

Comments

Nitin A Kamble - May 3, 2012, 6:15 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

Avoid this error:
| rmdir: failed to remove `/srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/tar-1.26-r1/image/usr/sbin/': No such file or directory
NOTE: package tar-1.26-r1: task do_install: Failed

no PR bump as no change in the output.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/recipes-extended/tar/tar.inc |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc
index 0533b82..5c2325a 100644
--- a/meta/recipes-extended/tar/tar.inc
+++ b/meta/recipes-extended/tar/tar.inc
@@ -18,8 +18,12 @@  do_install () {
 do_install_extra () {
     install -d ${D}${base_bindir}
     mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN}
-    rmdir ${D}${bindir}/
-    rmdir ${D}${sbindir}/
+    if [ -d ${D}${bindir}/ ] ; then 
+        rmdir ${D}${bindir}/
+    fi
+    if [ -d ${D}${sbindir}/ ] ; then 
+        rmdir ${D}${sbindir}/
+    fi
     mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN}
 }