git: makewhatis(8): change index build logic

Franco Fichtner franco at crater.dragonflybsd.org
Sun Dec 8 09:04:15 PST 2013


commit cec6bace6f63efabea4dc51d478f002ab8b1d66a
Author: Franco Fichtner <franco at lastsummer.de>
Date:   Sun Dec 8 13:38:50 2013 +0000

    makewhatis(8): change index build logic
    
    This commit reflects on issues brought up by swildner.  The idea
    behind this change is simple:  track each manual page via
    its inode and append all alternative names to the same struct.
    The former logic missed references across sections, so the
    manual page indexing now covers all sections before creating
    the whatis database.
    
    The index now only reflects the layout of /usr/share/man (or
    the specified path), and *not* the contents of a manual page,
    except for its description.
    
    As a consequence, all MLINKS are now properly referenced in
    the apropos(1) output.
    
    I wanted to have the `real' file as the first name, but it's
    better to keep the style consistent with `SEE ALSO' sections
    by sorting per section, then per name.  Output as follows:
    
        # apropos vcd
        vcd(4), vkd(4), vke(4), vkernel(7) - virtual kernel architecture

Summary of changes:
 usr.sbin/makewhatis/makewhatis.8 |   9 +-
 usr.sbin/makewhatis/makewhatis.c | 324 +++++++++++++++++++++------------------
 2 files changed, 177 insertions(+), 156 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cec6bace6f63efabea4dc51d478f002ab8b1d66a


-- 
DragonFly BSD source repository



More information about the Commits mailing list