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

Re: Why 2 inconsistent package managers frontents?

On Sun, 18 Jun 2000, Joey Hess wrote:

> Jason, the available file is not just some "dselectism". It's used by
> lots of programs, dpkg to name one. It is a fundamental part of a Debian
> system, and of what makes Debian special (as opposed to say, Red Hat):

Oh come on, there are lots of ways to query the database, dpkg
--print-avail is the *least* useful of the lot. 

If you are using APT then you have a whole battery of functions to get
available information, all of which are faster and better than what is 
offered through the available file.

There are exactly two reasons to support it:
  1) To support dselect, which is already done through [U]pdate, just like
     every other dselect method
  2) To support other programs that try to directly query the available
     file [bad in the first place], or use 'dpkg --print-avail'

Otherwise it is just a several meg waste of space, heck in older versions
of dpkg it actually wasted disk space, memory and cpu cycles all at once!

The people doing #2, like tasksel, would be *much* better served by using
apt-cache directly. For instance:

apt-cache search '^task-' --names-only -f

or even

apt-cache dumpavail

For the desperate.

IMHO the whole available/status scheme was poorly thought out and has
never been adaquate for APT. IMHO any tool written in the past serveral
years should be able to use, and prefer, the APT interface rather than the
dpkg one for available information. The fact that apt-get does not update
the available file should have made this obvious. 

This will become increasingly important in the future, the latest CVS code
has the 10 lines necessary to *select the available version* and APT GUI's
are starting to implement and use that feature.

Basically that means there is no such thing as a static available file. 
The version selections can change after every run of any APT tool. This
was always the long term goal for the APT suite.

I think it is fairly evident that it is unworkable to update the several
meg available file every time a tool is run, and it is equally unworkable
to maintain incorrect available information. The only solution is for all
the tools to use a dynamic query method (apt-cache) that can understand

> apt-get update should update the available file too, and that's all
> there is to it. Would you like a patch?

I've always said people who want this should be using 'dselect update',
but I would be willing to add a post-update hook that would allow people
to update the available file automatically, if they wish.

> A Debian system without a populated available file is a crippled Debian
> system.



Reply to: