"why" should report based on the dependencies of the candidate, not
the installed version.
# aptitude full-upgrade
The following NEW packages will be installed:
curl{a}
# aptitude why curl
i apt-file Depends wget | curl
(So the user panics: "you mean wget is not installed anymore?!")
# set wget curl
# for i do dpkg -l $i|tail -n 1; done
ii wget 1.11.4-2 retrieves files from the web
un curl <none> (no description available)
# aptitude -v show apt-file|egrep Version\|Depends
Version: 2.2.0
Depends: perl, curl, libconfig-file-perl, libapt-pkg-perl,
Version: 2.1.6
Depends: perl, wget | curl, libconfig-file-perl, libapt-pkg-perl,
# apt-cache policy apt-file
apt-file:
Installed: 2.1.6
Candidate: 2.2.0
The man page says:
By default aptitude outputs only the "most installed, strongest,
tightest, shortest" dependency chain.
Well, "most installed" doesn't mean you should necessarily use the
dependencies of the installed version over the candidate.
On Fri, Jan 09, 2009 at 01:42:39AM +0800, jidanni@jidanni.org was heard to say: Could you please explain more explicitly what the bug is? What did you expect aptitude to display? Are you saying there's a tighter dependency on curl than the apt-file one? Actually, that's exactly what it means. Maybe I should reword that manual section to be more clear. Daniel
I want it to say: # aptitude why curl i apt-file Depends curl i.e., please have "why" base its response on the same things as full-upgrade does. Or, you can add to the man page: "why" is not ever affected by "update". One can "aptitude update" till one is blue in the face, but "why" does not use that information...
On Fri, Jan 09, 2009 at 11:01:51AM +0800, jidanni@jidanni.org was heard to say:
some hypothetical state that you might put it into, so this isn't likely
to happen. However, the places where the same logic is exposed in the
curses and GTK+ frontends should probably use the to-be-installed
version if they don't already. It looks like the command-line also does
the "wrong thing" if you ask it for a reason after queuing up an upgrade:
The following NEW packages will be installed:
ttf-wqy-zenhei{a} wesnoth wesnoth-aoi{a} wesnoth-core{a} wesnoth-data{a} wesnoth-did{a} wesnoth-editor{a}
wesnoth-ei{a} wesnoth-httt{a} wesnoth-l{a} wesnoth-music{a} wesnoth-nr{a} wesnoth-sof{a} wesnoth-sotbe{a}
wesnoth-thot{a} wesnoth-trow{a} wesnoth-tsg{a} wesnoth-ttb{a} wesnoth-utbs{a}
0 packages upgraded, 19 newly installed, 0 to remove and 11 not upgraded.
Need to get 161MB of archives. After unpacking 246MB will be used.
Do you want to continue? [Y/n/?] w wesnoth-ttb
Unable to find a reason to install wesnoth-ttb.
If you add --show-why, you'll see that aptitude can compute the right
thing in this scenario; the parameters just need to be tweaked so that
it does.
Daniel
DB> It looks like the command-line also does the "wrong thing" if you DB> ask it for a reason after queuing up an upgrade Well I hope then that the man page will explain why "why" and "w" will give different results.
found 511230 0.6.1.5-1
thanks
# aptitude full-upgrade
The following NEW packages will be installed:
gdbserver{a}
The following packages will be upgraded:
gdb
1 packages upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 2,068kB of archives. After unpacking 287kB will be used.
Do you want to continue? [Y/n/?] n
Abort.
# aptitude -v --show-summary why gdbserver
Packages requiring gdbserver: <---bad, no output
# aptitude search ~n^gdb$
i gdb - The GNU Debugger
# aptitude why gdbserver
i gcc Suggests gdb
p gdb Depends gdbserver <-----p is wrong, see above, it should be i.
# aptitude -W full-upgrade
The following NEW packages will be installed:
gdbserver{a} (for gdb)
The following packages will be upgraded:
gdb
1 packages upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 2,068kB of archives. After unpacking 287kB will be used.
Do you want to continue? [Y/n/?] n
Abort.
OK, I'm setting Aptitude::CmdLine::Show-Why=true.
found 511230 0.6.1.5-2
thanks
# aptitude -W full-upgrade
The following NEW packages will be installed:
iso-codes{a} libdrm-radeon1{a} (for libgl1-mesa-dri)
We see iso-codes doesn't say why. BTW sometime we see "(for )".
# aptitude why iso-codes
i apt-listchanges Depends python-apt
i A python-apt Recommends iso-codes
The only way to really find out what it depends on is to install it then
remove it
The following packages will be REMOVED:
iso-codes{p}
The following packages have unmet dependencies:
libgstreamer-plugins-base0.10-0: Depends: iso-codes but it is not going to be installed.
No wonder.