[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Status of install-info
From: |
Ian Zimmerman |
Subject: |
Re: Status of install-info |
Date: |
Sun, 02 Jul 2006 04:32:34 -0700 (PDT) |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Ian> So, if I just process every (appropriately named) file in the
Ian> directory, I'll end up with duplicate entries.
Eli> My failing memory suggests that install-info removes duplicate
Eli> entries. Am I right (I don't have time to look in the code right
Eli> now)?
Well, if you're adding just one entry, it doesn't really hurt to use
linear search. I'm regenerating from scratch, so that would be
quadratic behaviour for me.
Ian> This can be avoided with a search data structure like a balanced
Ian> tree or hash table, but that seems _really_ overkill. OTOH I can't
Ian> just ignore symlinks, they could point somewhere else
Ian> (e.g. /usr/share/<package>) and then I'd miss their entries.
Ian> Suggestions?
Eli> How about if you ignore only those symlinks whose targets are in
Eli> the same directory?
Have you read the Linux realpath(3) manpage lately? :-) Also,
subdirectories would have to be treated the same way, and detecting that
a directory is a sub of another is a headache too with the constraints I
have (pre-standard C, needs to work on Cygwin).
--
A true pessimist won't be discouraged by a little success.