Skip to content
Commit a85d7d32 authored by Mihail Konev's avatar Mihail Konev Committed by Colin Watson
Browse files

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: default avatarNikola Forró <nforro@redhat.com>
Tested-by: default avatarNikola Forró <nforro@redhat.com>
parent b0f93b59
Pipeline #485595065 passed with stages
in 8 minutes and 56 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment