man(1): Fix override dir handling
Previously, override dir was affecting only some cases of manpath determination. Apply it only when all paths have been gathered instead. Also look for override dir when sorting candidates. Fixes src/tests/man-override-dir failing when --with-override-dir=od is passed to ./configure. [cjwatson: Refactored candidate comparison to use a strcmp-style function, and simplified the addition of override directories a little more.] * src/man.c (compare_override_dir): New function. (compare_candidates): Compare override directory status between comparing section extensions and comparing locale elements. * src/manp.c (insert_override_dir): Remove. (get_manpath_from_path, add_man_subdirs): Remove calls to insert_override_dir. (create_pathlist): Add OVERRIDE_DIR at the canonicalization stage instead. * NEWS.md: Document this. Reported-by:Nikola Forró <nforro@redhat.com> Tested-by:
Nikola Forró <nforro@redhat.com>
Please register or sign in to comment