I'm using Lubuntu 13.10
which doesn't include gedit
by default. But I have installed it using
sudo apt-get install --no-install-recommends gedit
Now, when I run apt-cache depends gedit
, zenity
and yelp
are among recommends
.
But when I run apt-cache showpkg gedit
, zenity
and yelp
are under Dependencies
(third line from bottom in the code below).
Dependencies:
3.8.3-0ubuntu3 - libatk1.0-0 (2 1.12.4) libc6 (2 2.14)
libcairo2 (2 1.2.4) libenchant1c2a (2 1.6.0)
libgdk-pixbuf2.0-0 (2 2.22.0) libgirepository-1.0-1 (2 0.9.3)
libglib2.0-0 (2 2.37.3) libgtk-3-0 (2 3.7.10)
libgtksourceview-3.0-1 (2 3.2.0) libpango-1.0-0 (2 1.14.0)
libpeas-1.0-0 (2 1.1.0) libx11-6 (0 (null)) libxml2 (2 2.7.4)
libzeitgeist-2.0-0 (2 0.9.9) gedit-common (2 3.8)
gedit-common (3 3.9) gsettings-desktop-schemas (0 (null))
python3-gi (2 3.0) python-gi-cairo (2 3.0)
gir1.2-peas-1.0 (0 (null)) iso-codes (0 (null))
gedit-plugins (0 (null)) zenity (0 (null)) yelp (0 (null))
gedit-plugins (3 2.91) gedit-plugins:i386 (3 2.91)
gedit:i386 (0 (null))
Why is that? Is the output of apt-cache depends
and apt-cache showpkg
influenced by software already present on my system and by whether I use --no-install recommends
? And what does (0 (null))
mean?
What I'm seeing is with a fully updated system. In other words, I have run sudo apt-get update && sudo apt-get dist-upgrade
and then tried the apt-cache
commands.
Best Answer
Sadly the dependency list is not translated into human readable form. The dependencies are in the form:
compareOp
is one of the following numbers:possibly added with
OR
means, that this dependency can be satisified by the following dependency as well, so only one of the "or"ed dependencies needs to be there.NoOp
has novalue
, hence you see those(0 (null))
outputs, as this is, how aNULL
string is printed by the C library. Well, yes, there is absolutely no translation!And I did not find any way to find out, which of the dependencies are mandatory, suggested, conflicts and so on. To get all information, at first run
to list the dependencies in human form. Sadly this lacks the details. And then find the details about dependencies with
Perhaps somebody else finds a better way (or creates a tool) to list the dependencies of a package with all needed gory detail in human readable form.
I tried to put this together into some script called
showdeps
, which seems to do the job. It is called like this:showdeps package..
The output is very similar to
apt-cache depends package..
, but includes a bit more detail.As a reference I copy it here, original is at https://github.com/hilbix/bashy/blob/debian/showdeps
This is free software with free as in free speech, free beer and free baby. No warranty, use at your own risk, and you cannot hold me liable for any error in it.
Example output: