Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] man-db: create man db index file
@ 2018-06-04 10:58 Kai Kang
  2018-06-04 11:42 ` Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Kang @ 2018-06-04 10:58 UTC (permalink / raw)
  To: openembedded-core

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

| root@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@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



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

* Re: [PATCH] man-db: create man db index file
  2018-06-04 10:58 [PATCH] man-db: create man db index file Kai Kang
@ 2018-06-04 11:42 ` Alexander Kanavin
  2018-06-05  2:27   ` Kang Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2018-06-04 11:42 UTC (permalink / raw)
  To: Kai Kang, openembedded-core

On 06/04/2018 01:58 PM, Kai Kang wrote:

> +pkg_postinst_ontarget_${PN} () {
> +        ${bindir}/mandb -q
> +}
> +

man-db is only the tools for manpages, but not the actual pages. So this 
will not work as expected when installing or removing packages that 
contain manpages. It should be added to classes/manpages.bbclass 
instead, with a RDEPENDS += "man-db". You can also fix man-pages_4.14.bb 
to inherit the class at the same time.

Oh, and you can also take qemu into use, so that this works also for 
read only rootfs, and doesn't add to first boot time, like this:
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=b42a7a733c7a6b51118ccb3fe6e33c35ac12b4ae

Alex


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

* Re: [PATCH] man-db: create man db index file
  2018-06-04 11:42 ` Alexander Kanavin
@ 2018-06-05  2:27   ` Kang Kai
  0 siblings, 0 replies; 3+ messages in thread
From: Kang Kai @ 2018-06-05  2:27 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 2018年06月04日 19:42, Alexander Kanavin wrote:
> On 06/04/2018 01:58 PM, Kai Kang wrote:
>
>> +pkg_postinst_ontarget_${PN} () {
>> +        ${bindir}/mandb -q
>> +}
>> +
>
> man-db is only the tools for manpages, but not the actual pages. So 
> this will not work as expected when installing or removing packages 
> that contain manpages. It should be added to classes/manpages.bbclass 
> instead, with a RDEPENDS += "man-db". You can also fix 
> man-pages_4.14.bb to inherit the class at the same time.
>
> Oh, and you can also take qemu into use, so that this works also for 
> read only rootfs, and doesn't add to first boot time, like this:
> https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=b42a7a733c7a6b51118ccb3fe6e33c35ac12b4ae 
>
>
> Alex
>
Hi Alex,

Thanks a lot. I'll try it.

-- 
Regards,
Neil | Kai Kang



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

end of thread, other threads:[~2018-06-05  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-04 10:58 [PATCH] man-db: create man db index file Kai Kang
2018-06-04 11:42 ` Alexander Kanavin
2018-06-05  2:27   ` Kang Kai

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