[OE-core] [PATCH] man-db: create man db index file

Kai Kang kai.kang at windriver.com
Mon Jun 4 10:58:28 UTC 2018


The man db index file doesn't exist, it causes commands whatis, apropos
and 'man -f' don't work as expect:

| root at qemux86-64:# whatis hosts
| hosts: nothing appropriate.

Run command mandb to create man db index file when first boot.

Signed-off-by: Kai Kang <kai.kang at windriver.com>
---
 meta/recipes-extended/man-db/man-db_2.8.2.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/man-db/man-db_2.8.2.bb b/meta/recipes-extended/man-db/man-db_2.8.2.bb
index 797f770408d..f47d66ce3df 100644
--- a/meta/recipes-extended/man-db/man-db_2.8.2.bb
+++ b/meta/recipes-extended/man-db/man-db_2.8.2.bb
@@ -21,6 +21,10 @@ do_install_append_libc-musl() {
         rm -f ${D}${libdir}/charset.alias
 }
 
+pkg_postinst_ontarget_${PN} () {
+        ${bindir}/mandb -q
+}
+
 FILES_${PN} += "${prefix}/lib/tmpfiles.d"
 
 FILES_${PN}-dev += "${libdir}/man-db/libman.so ${libdir}/${BPN}/libmandb.so"
-- 
2.11.0




More information about the Openembedded-core mailing list