On Mon, Sep 24, 2001 at 12:21:39PM -0700, Peter Jay Salzman wrote: > begin: Hereward Cooper <[EMAIL PROTECTED]> quote > > once upon a time Peter Jay Salzman <[EMAIL PROTECTED]> said: > > > problem: two systems with the same sources.list don't know about the > > > same available packages. > > > > have you tried running the update selection from dselect. I think the > > problem is that dpkg only lists the files from the package list when > > updated via dselect. Or alternativly you could use "apt-cache search > > <filename>" which would use the apt package list. > > thanks for the reply. so dselect and apt contain different views of what > packages are on the system?
Never of what packages are on the system, as far as I know, but perhaps of what packages are available. When apt-get says "Reading Package Lists", one of the things it's reading in is dpkg's status file. dpkg and dselect are the original package management systems, more or less. They functioned as a pair: dpkg handled low-level (through dpkg-deb) and medium-level functions, while dselect handled the high-level primary user interface. They are still built from the same source tree, and interface rather closely with each other. Thus, any time you ask dpkg for information, the tool you should expect to have updated it is dselect. apt (originally deity) was written, I think, in large part out of frustration that dpkg/dselect weren't really being developed very actively at the time, and in an attempt to produce a better user interface than dselect. apt also has its own database of available package information, which is in a binary format and much faster than dpkg's text-based available file; in certain situations, which I'll describe in a moment, the two are synchronized. The first and still the most widely-known tool that they produced on top of the libapt-pkg library was apt-get, which was originally basically a debugging tool (the man page describes it as 'the user's "back-end" to other tools using the APT library'). People started using it as their primary package management front-end, and it ended up being what a lot of people think of as apt. The full-scale dselect replacements are still in development, although some of them are reaching maturity now. What apt *also* succeeded in producing, though, was a much better set of back-ends to dselect. People used to use various things like the ftp, mountable, and cdrom methods: these were all fairly buggy to one degree or another, and apt managed to become a fantastic replacement for all of them. If you use apt that way, through dselect rather than through the incomplete tool apt-get, then you'll find that dpkg's and apt's package databases stay in sync. > just tried it -- i think you're right. imho, this goes beyond > inelegance, and borders on a bug that needs to be fixed. it's > unthinkable that there are two databases of available packages which > are out of sync everytime we choose apt over dselect or dselect over > apt. Somewhat. Mostly it's a documentation bug. Far too many of the intentions of apt and apt-get are buried in oral history, so people keep asking things like why apt-get doesn't handle recommends and suggests. Far too many people aren't aware, it seems, that you can use dselect and apt simultaneously and have everything work. I wish, though, that apt-get would tell you that it hasn't updated dpkg's database. The 'apt-get update' versus 'dselect update' thing is an incredibly frequently asked question. > seems like debian should strive to make apt and dselect front ends for > the same package management system. :( They are, more or less. It's just that apt-get is one component of it which doesn't interact with other components at the level you're expecting. I agree that it's confusing. With regard to 'dpkg -l', I'm not sure that it's ever been guaranteed to work the way you want. 'dpkg -l' looks in /var/lib/dpkg/status, while you want information from /var/lib/dpkg/available. Unless something has explicitly synchronized one with the other, you won't get the information you're looking for: it really only displays available package information by luck. If dpkg's database is up to date, you want 'dpkg -p' or similar. Cheers, -- Colin Watson [EMAIL PROTECTED]