[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] hrmib cache for dpkg

Anders F Björklund <afb@users.sourceforge.net> writes:

> Goswin von Brederlow wrote:
>>> I made a quick port of the "HR-MIB cache" for net-snmp of rpm,
>>> so that it can be used with the dpkg packaging system as well.
> ...
>>> PS. It can also be used for doing bash-completion of packages.
>>>     There are patches for this available elsewhere on the net.
>> A few points:
>> 2) If versions are taken without epochs then versions can collide and
>> they won't work well.
> Is it normal to have more than one package of the same name installed ?
> I thought it would error on the versions already, let alone the epochs.
> But if you do have the same name-version installed more than once then
> it would only show up once and removing one might delete the file,
> right.

I was thinking more along the line of 2 packages with the same version
but different epoch and upgrading from one to the other. If removing a
package removes the cache file then the old package would remove the
new packages file.

>> 3) Each new version creates a new file. Who cleans up obsolete files?
>> Or is the "cache" supposed to grow and grow and grow?
> If you remove the package, the file is supposed to get deleted too...
> (the files are 0 bytes in size, so it doesn't grow by all that much)
> It's of course easy enough to just delete the entire directory and
> recreate it from the current dpkg package list if anything goes wrong.
>> 4) /var/log/dpkg seems to also alraedy have the info.
> It was missing for some packages, and old log files were rotated away ?
> But it wasn't a log, more of a exported information directory (cache)
> Grepping through the log output is probably worse than grepping status,
> which is already twice as slow for bash-completion than checking a file.
> --anders

Not sure what my zsh does but the first time I <tab> apt-get it takes
a second or two and then it has it cached.


Reply to: