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

Re: aptitude has Priority: standard, why?



2015-04-01 20:43 The Wanderer:
(Sorry for the delay in replying; I had a response within minutes, but
I've been having bizarre Internet-access issues all day, and I'm not
even sure they're gone yet.)

On 04/01/2015 at 12:02 PM, Peter Samuelson wrote:

[The Wanderer]

it is IMO not viable for actual use - except perhaps by people who
already know completely what they are doing and how to override
aptitude's suggestions.

That sounds like you believe aptitude has only a command-line
interface.

I was indeed only aware of its command-line interface, until just
yesterday; comments in this thread mentioning a "curses interface" led
me to experiment, and discover how to invoke that.

So far as I recall, no documentation or other explanations which I've
ever run across have so much as mentioned this interface, much less
explained how to invoke it or described doing anything through it. The
man page does not mention the term 'curses', and 'interactive' - which
is the only other obvious term I can think of to search for when looking
for something like this mode, even knowing that such a mode exists -
could just as easily describe the "does this dependency solution look
good to you?" mode of operation.

I have yet to do much of anything with that interface, so I'm not
currently competent to speak about it one way or another.

For learning more about the possibilities of aptitude, the user manual is quite
good, actually (with screenshots of different screens, explanations about search
filters, etc).

 http://aptitude.alioth.debian.org/doc/en/

Axel uploaded it there, but you can also install it locally, in english
(aptitude-doc-en) and other languages.


Does aptitude include an equivalently functional analog for
apt-cache?

Well, the things I use most - the 'show' and 'search' functions -
are certainly in aptitude, but apt-cache has a dozen other
subcommands and I don't know whether aptitude implements those in
some way.

If I recall correctly, my original question was about a replacement for
'apt-cache policy', which is about the single most common thing I use
apt-cache for - with show and search being probably second and third
place, respectively. I have been unable to identify any aptitude analog
for that functionality.

The "search" and other commands that accept the same filters and presentation
options (like "versions") allow a very rich query system and possibilities of
customisation in the presentation -- although there are some bugs and not all
fields are implemented/documented (like the URL of the repo).

The examples below show similar info to the "apt-cache policy" mode, in command
line.

(output slightly edited for width and so on)
=====================================================

$ apt-cache policy subversion
subversion:
 Installed: 1.8.10-5
 Candidate: 1.8.10-6
 Version table:
   1.8.10-6 0
     500 http://ftp.uk.debian.org/debian/ unstable/main amd64 Packages
  *** 1.8.10-5 0
     100 /var/lib/dpkg/status

=====================================================

$ aptitude versions ~n^subversion$
Package subversion:
i   1.8.10-5                                                100
p   1.8.10-6            unstable                            500

Package subversion:i386:
p   1.8.10-6            unstable                            500

=====================================================

$ aptitude versions '?name(^subversion$)' -F '%C %A %t %i %p %v %V'
Package subversion:
installed   hold                                  100  1.8.10-5
purged      hold       unstable                   500  1.8.10-6

Package subversion:i386:
purged      none       unstable                   500  1.8.10-6
=====================================================


I am more fan of the curses interface, though, so I normally use it differently.

What I would do is to fire "aptitude" with no options, press "/" to start
searching, enter "^subversion$" (or same but with "l" to limit/filter the view
to only those matches), press "n" until I find the package that I want among all
matches (mine shows "subversion" and "subversion:i386" for the extra arch, as
above).  Then press "enter" to view the detail of the default version (showing
description etc., and dependencies installed and missing), and if needed go to
the bottom to browse the other available versions with the same package name
(pressing enter here shows the details particular to that version, like
different dependencies).

This is a heavy-handed way of just viewing the available versions and what would
be installed by default, but I would typically be doing other things at the same
time (like selecting a bunch of packages to upgrade, or choosing manually
between the optional or suggested dependencies that I want to install along with
the package).


Hope that helps.
--
Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>


Reply to: