Axel Beckert wrote, On 01/23/2015 11:16 AM:
Hi,
U.Mutlu wrote:
is it possible to output also the version (and architecture) of a
pkg when doing a search?
Yes.
For example this command shows the version of the installed pkg:
# dpkg -l | grep -i lxc
ii lxc 1:1.0.6-6 amd64 Linux Containers userspace tools
But aptitude search unfortunately doesn't show any version number:
# aptitude -V -t testing search lxc
i lxc - Linux Containers userspace tools
Or did I miss a program switch?
From the man page:
-F <format>, --display-format <format>
Specify the format which should be used to display output
from the search and versions commands. For instance,
passing “%p %V %v” for <format> will display a package's
name, followed by its currently installed version and its
available version (see the section “Customizing how
packages are displayed” in the aptitude reference manual
for more information).
The command-line option --disable-columns is often useful in
combination with -F.
For search, this corresponds to the configuration option
Aptitude::CmdLine::Package-Display-Format; for versions,
this corresponds to the configuration option
Aptitude::CmdLine::Version-Display-Format.
To take your example with the example from the man page:
$ aptitude search -F '%p %V %v' lxc
libclxclient-dev 3.9.0-2 <none>
libclxclient3 3.9.0-2 <none>
lxc 1:1.0.6-6 1:1.0.6-6
lxc-dbg 1:1.0.6-6 <none>
lxctl 0.3.1+debian-3 0.3.1+debian-3
nova-compute-lxc 2014.1.3-9 <none>
Oh, that's cool; it's already available in the program.
Sorry, I should've consulted the manual before posting... :-)
Thx
Uenal
You can get the full aptitude manual in English at
https://aptitude.alioth.debian.org/doc/en/. Other languages are
available at https://aptitude.alioth.debian.org/doc/.
Regards, Axel
_______________________________________________
Aptitude-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/aptitude-devel