[oe-commits] [meta-openembedded] 13/18: recipes-connectivity/samba: Only rmdir directories that exist

git at git.openembedded.org git at git.openembedded.org
Tue Jan 26 23:15:17 UTC 2016


joe_macdonald pushed a commit to branch master
in repository meta-openembedded.

commit 751659c243caae359213ee1cdb242c7eaadda73b
Author: mike.looijmans at topic.nl <mike.looijmans at topic.nl>
AuthorDate: Mon Jan 11 18:53:52 2016 +0100

    recipes-connectivity/samba: Only rmdir directories that exist
    
    Depending on PACKAGECONFIG selection, the /run/samba directory may not
    have been created. Make the do_install_append handle both situations
    by checking whether these directories exist before attempting to remove
    them.
    
    This fixes do_install failing with an error like this:
     rmdir: failed to remove '/.../samba/4.1.12-r0/image/run/samba': No such file or directory
    
    Signed-off-by: Mike Looijmans <mike.looijmans at topic.nl>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
---
 meta-networking/recipes-connectivity/samba/samba_4.1.12.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
index 3d677be..4231513 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
@@ -111,8 +111,12 @@ EXTRA_OECONF += "--enable-fhs \
 LDFLAGS += "-Wl,-z,relro,-z,now"
 
 do_install_append() {
-    rmdir --ignore-fail-on-non-empty "${D}/run/samba"
-    rmdir --ignore-fail-on-non-empty "${D}/run"
+    if [ -d "${D}/run" ]; then
+        if [ -d "${D}/run/samba" ]; then
+            rmdir --ignore-fail-on-non-empty "${D}/run/samba"
+        fi
+        rmdir --ignore-fail-on-non-empty "${D}/run"
+    fi
 
     if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then
         install -d ${D}${systemd_unitdir}/system

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list