l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
January 6: Social gathering
Next Installfest:
Latest News:
Nov. 18: Club officer elections
Page last updated:
2004 Aug 14 05:15

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Debian Unstable - apt strangeness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Debian Unstable - apt strangeness

Quoting Peter Jay Salzman (p@dirac.org):

> Apt and dpkg seem to have differing views about what packages are
> available.

As they should.  They do entirely different things -- and work together
as a stack (apt invoking dpkg; dpkg being lower in the stack).

apt (meaning apt-get, apt-cdrom, apt-zip):  Fetches packages from sundry 
package sources, resolves dependencies, manages the available-packages

dpkg:  removes packages, installs fetched packages (that have been
dropped off into /var/cache/apt/archive), initiates "--configure" step
for some packages immediately following their installation.

> For example:
> Dpkg doesn't believe this package exists:
>    lucifer# dpkg -l libgimp2.0
>    No packages found matching libgimp2.0.

I think you're misinterpreting:  dpkg is merely saying that no package
matching that ASCII pattern is _installed_.  dpkg knows nothing about 
available packages (as indicated in /var/lib/apt/lists/*Packages and
/var/lib/dpkg/available).  It knows only about the contents of
/var/lib/dpkg/status -- the "installed packages" database.

> In fact, dpkg is pretty much clueless about gimp in general:
>    lucifer# dpkg -l "*gimp*"
>    ||/ Name           Version        Description
>    +++-==============-==============-==========================
>    un  gimp1.3        <none>         (no description available)

I'm pretty sure that "un" means "Desired=Unknown, Status=Not installed"
(i.e., that the u and the n are separate key values with those meanings).
But I could be wrong.

> Yet apt-get knows how to get the packages:
>    lucifer# apt-get install libgimp2.0
>    Reading Package Lists... Done
>    Building Dependency Tree... Done
>    The following NEW packages will be installed:
>      libgimp2.0
>    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
>    Need to get 435kB of archives.
>    After unpacking 1950kB of additional disk space will be used.
>    Get:1 http://debian.rutgers.edu unstable/main libgimp2.0 2.0.4-1 [435kB]
>    Fetched 435kB in 28s (15.1kB/s)
>    (snip)

Er, big disclaimer, here:  I'm really fuzzy on what the GIMP-related
packages are, and why there would be a libgimp2.0 package distinct from
a gimp1.3 package, which in turn is digtinct from a "gimp" package.  I
have just these on my workstation:

rick@alfredo:~$ dpkg -l gimp | more
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
ii  gimp           2.0.3-2        The GNU Image Manipulation Program,
stable v
You have new mail in /var/mail/rick
rick@alfredo:~$ dpkg -l libgimp | more
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
un  libgimp        <none>         (no description available)

Anyhow, dpkg is what you use to find out whether something's installed
on your system or not.  It manages packages _locally_.  But it knows
nothing about what packages are and are not available from package
sources listed in /etc/apt/sources.list .  For that, use apt-get.

> Why isn't dpkg giving me a comprehensive list for -l "*gimp*"?  On my
> testing machines, 'dpkg -l "*gimp*" | wc -l' gives me 112...

Hmm, there's some subtle point about dpkg syntax and operation, here,
that's unfamiliar to me.  "dpkg -l *gimp* | wc -l" returns "101" on my
workstation.  Looking at the output without the wc filter shows, among
other things, a tremendous number of successive versions of libgimp that
are not installed at all.  I'm not entirely sure what that's about, but
suggest that the return data you get without using globbing will be more
useful and relevant.

(I'm no expert at this.  I go pretty much strictly by heuristics and
sessions with ye olde manpage.)

Cheers,     Founding member of the Hyphenation Society, a grassroots-based, 
Rick Moen   not-for-profit, locally-owned-and-operated, cooperatively-managed,
rick@linuxmafia.com     modern-American-English-usage-improvement association.
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.