Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Running makemandb on every boot
Hi,
I am not sure if this is a good idea or not, just throwing it out for
consideration. If we could just get the mtime for the latest modified
file within each man page directory (man1, man2 etc.) and then compare
those with the latest mtimes stored in the database for those
directories, we can figure out which directories have had man pages
modified since the last run of makemandb. Then we just have to go to a
subset of these directories to do stat(2) in order to get the list of
modified files.
For example I was thinking perhaps scandir(3) might be useful here?
But if scandir(3) or any such other function itself goes and does
stat(2) on all the files, then it will only make things slower. Also,
this won't work in cases where man page(s) have been removed from the
system and the database entries for such pages have to be removed.
--
Abhinav
On Mon, May 19, 2014 at 9:45 PM, Martin Husemann <martin%duskware.de@localhost>
wrote:
> On Mon, May 19, 2014 at 06:07:31PM +0200, Joerg Sonnenberger wrote:
>> Doesn't work, it could be a file that didn't exist on the last run.
>> Consider running pkg_add.
>
> Maybe we should not install those files with older mtimes then ;-)
>
> Martin
Home |
Main Index |
Thread Index |
Old Index