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

Re: Does dpkg -l refer only to installed, as opposed to available, packages?



On Sat, Feb 14, 2004 at 12:12:38PM -0800, C. Chad Wallace wrote:
> Mario Vukelic wrote:
> >On Sat, 2004-02-14 at 03:24, Colin Watson wrote:

> It says the same for me in the man page for dpkg-query(8), but when I do 
> a dpkg -l, all the packages listed are either 'ii' (meaning selected and 
> installed) or 'rc' (meaning removed, but not purged--IOW, they were once 
> installed).  This couldn't possibly be all available packages for 
> debian/testing because, for instance, I'm not using X and never have on 
> that machine.
> 
> So it appears Colin is right in saying that dpkg -l gets its information 
> from /var/lib/dpkg/status, not .../available.  The documentation must be 
> wrong.

After experimenting a little, it appears that, if you specify a package
name, it "first" looks in dpkg/status, and if it doesn't find it there
then looks in available.  Note the following (some parts cut for
clarity)..

dlb@localhost:~$ apt-cache policy mutt
mutt:
  Installed: 1.5.5.1-20040105+1
  Candidate: 1.5.5.1-20040105+1
  Version Table:
     1.5.5.1-20040112+1 0
        120 ftp://ftp.us.debian.org sid/main Packages
 *** 1.5.5.1-20040105+1 0
        900 ftp://ftp.us.debian.org sarge/main Packages
        100 /var/lib/dpkg/status

dlb@localhost:~$ dpkg -l mutt
||/ Name           Version        Description
+++-==============-==============-============================================
ii  mutt           1.5.5.1-200401 Text-based mailreader supporting MIME,
GPG, 

dlb@localhost:~$ dpkg -l "mutt*"
||/ Name           Version        Description
+++-==============-==============-============================================
ii  mutt           1.5.5.1-200401 Text-based mailreader supporting MIME,
GPG, 
un  mutt-i         <none>         (no description available)
pn  mutt-ja        <none>         (no description available)
pn  mutt-utf8      <none>         (no description available)
pn  muttprint      <none>         (no description available)
pn  muttprint-manu <none>         (no description available)
pn  muttprofile    <none>         (no description available)
pn  muttzilla      <none>         (no description available)

dlb@localhost:~$ dpkg -l mutt-ja
||/ Name           Version        Description
+++-==============-==============-============================================
pn  mutt-ja        <none>         (no description available)



Reply to: