Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-networking][PATCH] recipes-connectivity/samba: Only rmdir directories that exist
@ 2016-01-11 17:53 Mike Looijmans
  2016-01-11 18:00 ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Looijmans @ 2016-01-11 17:53 UTC (permalink / raw)
  To: openembedded-devel

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@topic.nl>
---
 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 a51d31f..8e89e49 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
@@ -104,8 +104,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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-13 17:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11 17:53 [meta-networking][PATCH] recipes-connectivity/samba: Only rmdir directories that exist Mike Looijmans
2016-01-11 18:00 ` Khem Raj
2016-01-11 18:06   ` Mike Looijmans
2016-01-11 18:11     ` Khem Raj
2016-01-12 15:17       ` Mike Looijmans
2016-01-13 17:17   ` [meta-networking][PATCH v2] recipes-connectivity/samba: Remove /run directory tree Mike Looijmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox