Re: Dynamic registration of files to packages
On Mon, 20 Nov 2000, Steve Greenland wrote:
> So if I had both vim and nvi installed, what does dpkg -S /usr/bin/vi
> return? The advantage of a "dpkg-register" is that update-alternatives
> could call it too. Another (very small) advantage is that it could write
> to one file, which could be searched all at once rather than having to
> open each *.extrafiles file. Dpkg -S is already slow enough. :-)
dpkg -S is slow, but not for that reason. To do a -S, dpkg intializes the
ENTIRE internal database. However, this is not needed. It should just read
in each .list file, and if it matches the requested pattern, store it for, as
there might be more than one package that contains the match. The act of
reading in status, and cross referencing all .list, is the slow part.
I plan on doing something about -S, but it isn't critical, as -S isn't one of
the main pipelines.
----BEGIN GEEK CODE BLOCK----
GCS d- s: a-- c+++ UL++++ P+ L++++ !E W+ M o+ K- W--- !O M- !V PS--
PE++ Y+ PGP++ t* 5++ X+ tv b+ D++ G e h*! !r z?
-----END GEEK CODE BLOCK-----
----BEGIN PGP INFO----
Adam Heath <firstname.lastname@example.org> Finger Print | KeyID
67 01 42 93 CA 37 FB 1E 63 C9 80 1D 08 CF 84 0A | DE656B05 PGP
AD46 C888 F587 F8A3 A6DA 3261 8A2C 7DC2 8BD4 A489 | 8BD4A489 GPG
-----END PGP INFO-----