Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 933757

Summary: sys-apps/man-db generated database is missing man pages located in non-standard paths (e.g. sys-devel/gcc man pages)
Product: Gentoo Linux Reporter: Herman Yanush <herman.yanush2>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: UNCONFIRMED ---    
Severity: minor CC: toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Herman Yanush 2024-06-07 15:43:38 UTC
For example sys-devel/gcc installs man pages in a weird location /usr/share/gcc-data/x86_64-pc-linux-gnu/13/man, which is added to MANPATH (and therefore e.g. "man 1 gcc" works) but is not considered when building mandb (therefore "apropos gcc" or "man -k gcc" fail to find gcc(1)).

This happens because
1. the path is not considered by mandb possibly because it is run by a /etc/cron.daily/mandb cron job in the environment without correct MANPATH (i'm not sure, idk how to verify this)
2. MANDB_MAP for this path is missing in man_db.conf

Reproducible: Always

Steps to Reproduce:
apropos -e gcc
Actual Results:  
gcc: nothing appropriate.

Expected Results:  
gcc (1)              - GNU project C and C++ compiler

A workaround:

Add to man_db.conf:
MANDATORY_MANPATH           /usr/share/gcc-data/x86_64-pc-linux-gnu/13/man
MANDB_MAP   /usr/share/gcc-data/x86_64-pc-linux-gnu/13/man /var/cache/man

Rebuild everything:
sudo -E mandb --create