makewhatis will allow duplicate entries in the windex file, wasting space, and
annoying users when they have to wade through useless duplicates from man -k
The man pages for the OpenGL unbundled product seem to especially trigger this:
% mkdir /tmp/man ; cd /tmp/man
% ln -s /usr/openwin/man/man3gl .
% /usr/lib/makewhatis /tmp/man
% ls -l windex
-rw-r--r-- 1 alanc staff 1104263 May 3 15:20 windex
[Using a copy of /usr/lib/makewhatis with -u added to sort command]
% ~/tmp/makewhatis /tmp/man
% ls -l windex
-rw-r--r-- 1 alanc staff 41484 May 3 15:20 windex
Fixing this should be as simple as changing "sort" to "sort -u" in the makewhatis
shell script.
Work Around
cd <man directory>
mv windex windex.bak
uniq windex.bak > windex