Bug#897137: live-build: man -k and apropos don't work in live system
Package: live-build
Version: 1:20170213
Tags: patch
In a live system built by live-build, "man -k" and apropos produce
no output except the message "<regexp>: nothing appropriate.", where
<regexp> is the argument that was given.
The cause is the command "rm -rf /var/cache/man/*" in
"/usr/share/live/build/hooks/normal/0190-remove-temporary-files.hook.chroot".
You can prevent the problem by doing the following before "lb config":
mkdir -p config/hooks/normal
cp -a /usr/share/live/build/hooks/normal/0190-remove-temporary-files.hook.chroot config/hooks/normal
patch config/hooks/normal/0190-remove-temporary-files.hook.chroot ~/Downloads/don-t-remove-man-page-database-cache.patch
(The patch is attached below).
###### Live System Information: ######
Name Version
===-=============================-===================
ii live-boot 1:20170112
ii live-config 5.20170112+deb9u1
ii live-tools 1:20151214+nmu1
Debian Release: 9.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-6-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
###### Host System Information: ######
Name Version
===-=============================-===================
ii debootstrap 1.0.89
ii live-build 1:20170213
Debian Release: 9.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-6-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru live-build-20170213/share/hooks/normal/0190-remove-temporary-files.hook.chroot live-build-20170213.1/share/hooks/normal/0190-remove-temporary-files.hook.chroot
--- live-build-20170213/share/hooks/normal/0190-remove-temporary-files.hook.chroot 2017-02-13 10:58:00.000000000 -0500
+++ live-build-20170213.1/share/hooks/normal/0190-remove-temporary-files.hook.chroot 2018-04-28 16:07:36.000000000 -0400
@@ -3,7 +3,6 @@
set -e
# Remove temporary files
-rm -rf /var/cache/man/*
for _DIRECTORY in /tmp /var/tmp
do
Reply to: