Skip to contentSkip to conversation

mariadb: clean the empty /lib dir

PATCH Superseded Yu, Mingli 1 participant 1 message Apr 15, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yu, Mingli

author
#0 lore raw

PATCH 1/1 mariadb: clean the empty /lib dir

From: Mingli Yu <[email protected]>

When usrmerge is enabled in DISTRO_FEATURES, there
comes below error:
ERROR: mariadb-10.4.12-r0 do_package_qa: QA Issue: mariadb-leftovers package is not obeying usrmerge distro feature. /lib should be relocated to /usr. [usrmerge]
ERROR: mariadb-10.4.12-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.

It is because empty /lib dir exists in mariadb-leftovers as below:

 $ rpm -qpl mariadb-leftovers-10.4.12-r0.core2_64.rpm |grep ^/lib
 /lib

So remove the empty /lib dir to fix the above error.

---
 meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +++
 1 file changed, 3 insertions(+)
meta-oe/recipes-dbs/mysql/mariadb.inc +3 -0
index 5ff273e..2387c2a 100644
@@ -170,6 +170,9 @@ do_install() {
     fi
     if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
         mv ${D}/lib/security ${D}/${libdir}
+        if [ "`ls -A ${D}/lib`" = "" ]; then
+            rm -rf ${D}/lib
+        fi
     fi
 }
 
Signature · 1 line
2.7.4