From 4632a8136c06be349b6ecded0ace22efeafd7aae Mon Sep 17 00:00:00 2001
From: Breno Leitao <breno.leitao@gmail.com>
Date: Wed, 26 Apr 2017 16:33:21 +0000
Subject: [PATCH] testing/libcypher-parser: Do not fail on rmmdir

As explained in the comments above the rmmdir, the rmmdir should not
fail if it is not empty. As I understand, the directories should only be
removed if they are empty.

Without this change, doc() and lintian() fails and break the build.
---
 testing/libcypher-parser/APKBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/libcypher-parser/APKBUILD b/testing/libcypher-parser/APKBUILD
index 1e223ed4b50b..4be75d2db98e 100644
--- a/testing/libcypher-parser/APKBUILD
+++ b/testing/libcypher-parser/APKBUILD
@@ -50,7 +50,7 @@ doc() {
     fi
 
     # remove if empty, ignore error (not empty)
-    rmdir "$pkgdir"/usr/share "$pkgdir"/usr 2>/dev/null
+    rmdir -f "$pkgdir"/usr/share "$pkgdir"/usr || true 2>/dev/null
     return 0
 }
 
@@ -61,7 +61,7 @@ lint() {
     mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
 
     # remove if empty, ignore error (not empty)
-    rmdir "$pkgdir"/usr/bin "$pkgdir"/usr 2>/dev/null
+    rmdir "$pkgdir"/usr/bin "$pkgdir"/usr || true 2>/dev/null
     return 0
 }
 md5sums="c4c9a3bd9a97f4d97c1ffeb1ff19ebbe  libcypher-parser-0.5.1.tar.gz"
-- 
GitLab