FAQ:Get Information about Installed Software
From rPath Wiki
| FAQ | ||
| Question: How can I get information about software installed on my Conary-based system? | ||
Answer: Use conary query, often abbreviated conary q, to display information about the software installed on a Conary-based system.
When used with no additional parameters, it lists all the installed software along with its versions. Because the amount of output is likely to be extensive, consider piping it through less:
$ conary query | less GConf=2.12.0-1-0.1 ... zlib=1.2.3-1-0.1
Conary operations are made on troves, entities which can contain files or other troves. In the example, each line displayed is a trove (along with its version, which is called a revision). The troves that contain other troves are known as packages; in this example, GConf and zlib are packages.
Specify a package or other trove names with conary query to restrict output to that information:
$ conary query dia dia=0.95_1-1-1
A component is a type of trove which is a collection of files dedicated to a single purpose. A component name starts with the package's name, contains a colon, and ends with a string describing the type of files it contains.
Use the --troves to list the component troves that were installed as part of a package:
$ conary q dia --troves dia=0.95_1-1-1 dia:data=0.95_1-1-1 dia:doc=0.95_1-1-1 dia:lib=0.95_1-1-1 dia:locale=0.95_1-1-1 dia:runtime=0.95_1-1-1
In this example, Conary displays the conary query results plus the underlying components for the specified package. The dia troves include data files, documentation, a library, locale-related files, and files supporting the GConf runtime environment.
| The abbreviation of query to q; many Conary commands can be abbreviated, but options, such as --troves, must be spelled out completely. |
Use --all-troves with conary query to display all troves, including those that are not installed:
$ conary q dia --all-troves dia=0.95_1-1-1 dia:data=0.95_1-1-1 dia:debuginfo=0.95_1-1-1 dia:doc=0.95_1-1-1 dia:lib=0.95_1-1-1 dia:locale=0.95_1-1-1 dia:runtime=0.95_1-1-1
In this example, notice that dia:debuginfo is a trove in dia that was not a part of the --troves listing of troves installed for the package.
Use --full-versions to display the full version string for each trove (used to identify update paths):
$ conary q dia --full-versions dia=/contrib.rpath.org@rpl:devel/0.95_1-1-1
Use --info: to display additional information, including the time the trove was built, its size, whether the trove is pinned, and the trove's flavor.
$ conary q openssl:lib --info Name : openssl:lib Build time: Fri Oct 21 03:14:03 2005 Version : 0.9.7f-10-0.1 Label : conary.rpath.com@rpl:1 Size : 1316264 Pinned : False Flavor : ~!bootstrap,krb is: x86(~!i686)
Query for Files in a Trove
Use the --ls and --lsl options for conary query (often abbreviated conary q) to view file information associated with a trove. In the following example, Conary displays the listing of all the files that are part of the components comprising the sudo package. The --ls option displays the absolute path to each file, and the --lsl option displays information for each file is in ls -l (long list) format:
$ conary q sudo --ls /usr/share/doc/sudo-1.6.8p9/CHANGES /usr/share/doc/sudo-1.6.8p9/INSTALL ... /usr/libexec/sudo_noexec.so /usr/sbin/visudo $ conary q sudo --lsl -rw-r--r-- 1 root root 66788 Jun 19 2005 /usr/share/doc/sudo-1.6.8p9/CHANGES -rw-r--r-- 1 root root 29482 Sep 14 2004 /usr/share/doc/sudo-1.6.8p9/INSTALL ... -rwxr-xr-x 1 root root 10227 Oct 17 2005 /usr/libexec/sudo_noexec.so -rwxr-xr-x 1 root root 57164 Oct 17 2005 /usr/sbin/vi
List files for a specific component by specifying the component name with one of the list options. In the following example, Conary displays the files contained in the dia:doc component:
$ conary q dia:doc --ls /usr/share/doc/dia-0.95_1/COPYING /usr/share/doc/dia-0.95_1/ChangeLog /usr/share/doc/dia-0.95_1/INSTALL /usr/share/doc/dia-0.95_1/NEWS /usr/share/doc/dia-0.95_1/README /usr/share/doc/dia-0.95_1/TODO /usr/share/doc/dia-0.95_1/plug-ins/xslt/README /usr/share/doc/dia-0.95_1/po/ChangeLog /usr/share/doc/dia-0.95_1/shapes/Circuit/README /usr/share/man/man1/dia.1.gz
If you have a file name and wish to know the trove, use --path with conary query to display the component in which the file is packaged. In this example, Conary indicates that the specified file /usr/sbin/visudo was packaged as part of the sudo:runtime component:
$ conary q --path /usr/sbin/visudo sudo:runtime=1.6.8p9-2-0.1
Query for Trove Dependency
Use --deps with conary query to display a trove's dependency-related information:
$ conary q openssl:lib --deps
openssl:lib=0.9.7f-10-0.1[is: x86(~!i686)]
Provides:
trove: openssl:lib
soname: ELF32/libcrypto.so.5(SysV x86)
soname: ELF32/libssl.so.5(SysV x86)
Requires:
abi: ELF32(SysV x86)
trove: openssl:config
trove: openssl:data
soname: ELF32/libc.so.6(GLIBC_2.0 GLIBC_2.1 GLIBC_2.1.3 GLIBC_2.3 SysV x86)
soname: ELF32/libcom_err.so.3(SysV x86)
soname: ELF32/libcrypto.so.5(SysV x86)
soname: ELF32/libdl.so.2(GLIBC_2.0 GLIBC_2.1 SysV x86)
soname: ELF32/libgssapi_krb5.so.2(SysV x86)
soname: ELF32/libk5crypto.so.3(SysV k5crypto_3_MIT x86)
soname: ELF32/libkrb5.so.3(SysV krb5_3_MIT x86)
soname: ELF32/libresolv.so.2(SysV x86)
soname: ELF32/libz.so.1(SysV x86)
Dependency-related information is divided into two sections:
- A provides section listing all the dependencies that the trove makes available
- A requires section listing all the dependencies that must be met for the trove to operate properly
The dependency-related information can include:
- Filenames
- Trove names
- User-related information
- Group-related information
- Java dependencies
- Perl dependencies
- Python dependencies
- Application binary interface (ABI) specifications
- Soname specifications for shared libraries
Use --file-deps with conary query to displays the individual provides and requires for each file:
$ conary q openssl:lib --file-deps
/lib/libcrypto.so.0.9.7f
Provides:
soname: ELF32/libcrypto.so.5(SysV x86)
Requires:
abi: ELF32(SysV x86)
soname: ELF32/libc.so.6(GLIBC_2.0 GLIBC_2.1 GLIBC_2.1.3 GLIBC_2.3 SysV x86)
soname: ELF32/libdl.so.2(GLIBC_2.0 GLIBC_2.1 SysV x86)
soname: ELF32/libz.so.1(SysV x86)
/lib/libssl.so.0.9.7f
Provides:
soname: ELF32/libssl.so.5(SysV x86)
Requires:
abi: ELF32(SysV x86)
soname: ELF32/libc.so.6(GLIBC_2.0 GLIBC_2.1.3 SysV x86)
soname: ELF32/libcom_err.so.3(SysV x86)
soname: ELF32/libcrypto.so.5(SysV x86)
soname: ELF32/libdl.so.2(SysV x86)
soname: ELF32/libgssapi_krb5.so.2(SysV x86)
soname: ELF32/libk5crypto.so.3(SysV k5crypto_3_MIT x86)
soname: ELF32/libkrb5.so.3(SysV krb5_3_MIT x86)
soname: ELF32/libresolv.so.2(SysV x86)
soname: ELF32/libz.so.1(SysV x86)
/usr/lib/libcrypto.so.5
/usr/lib/libssl.so.5
If a file has no dependencies, none will be listed. In this example, the files /lib/libcrypto.so.0.9.7f and /lib/libssl.so.0.9.7f have some provides and requires listed, and the files /usr/lib/libcrypto.so.5 and /usr/lib/libssl.so.5 have no dependencies.
Query Groups
Use conary query (often abbreviated as conary q) to get information about a group in the same way as for other troves installed on a Conary-based system.
To list all installed groups, grep conary q with the string group- which is the prefix of every group name.
$ conary q | grep group- group-base=0.2.0-1-6[~MySQL-python.threadsafe,~glibc.tls,~!grub.static,~!kernel.debug, ~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,~!openssh.static_libcrypto, ~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)] group-core=0.3.1-1-1[~MySQL-python.threadsafe,~glibc.tls,~!grub.static,~!kernel.debug, ~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,~!openssh.static_libcrypto, ~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)] group-devel=1.0.3-0.4-15[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,~!grub.static, ~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard, ~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)] group-dist-extras=1.0.2-0.10-15[~MySQL-python.threadsafe,~!builddocs,~glibc.tls, ~!grub.static,~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard, ~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)] ... group-xorg=1.0.3-0.4-15[~MySQL-python.threadsafe,~!builddocs,~glibc.tls, ~!grub.static,~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard, ~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)]
In the example, each group has an output string in brackets that wraps to the next two or three lines. This string displays the flavor of each group.
Use the group name in the same way as package and component names to specify a group in the query command:
$ conary q group-core group-core=0.3.1-1-1[~MySQL-python.threadsafe,~glibc.tls,~!grub.static,~!kernel.debug, ~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,~!openssh.static_libcrypto, ~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)]
Use --troves to list group troves that make up the group:
$ conary q group-dist --troves group-dist=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,~!grub.static, ~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard, ~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)] group-base=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,~!grub.static, ~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard, ~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint is: x86(~!mmx,~!sse2)] ... group-xorg=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,~!grub.static, ~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard, ~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe, ~!xorg-x11.xprint is: x86(~!mmx,~!sse2)]
Use --recurse to display a hierarchy of groups (shown by indentation) within a group (such as for top-level groups) and packages within the groups:
$ conary q group-dist --recurse
group-dist=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,~!grub.static,
~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,
~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint
is: x86(~!mmx,~!sse2)]
group-base=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,
~!grub.static,~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,
~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint
is: x86(~!mmx,~!sse2)]
ImageMagick=6.2.3.3-3.3-1
MAKEDEV=3.19-4-0.2
a2ps=4.13b-17-0.1[~!builddocs]
acl=2.2.28-2-0.1
acpid=1.0.4-6-0.1
alsa-lib=1.0.9-2-0.1[~!builddocs]
alsa-utils=1.0.9a-3-0.1
anacron=2.3-9-0.1
apmd=3.0.2-11-0.1
arpwatch=2.1a13-4-0.1
...
Combine options if desired to extend the functions of each option. Combining --troves and --recurse adds components for each group in the output hierarchy:
$ conary q group-dist --troves --recurse
group-dist=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,~!grub.static,
~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,
~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint
is: x86(~!mmx,~!sse2)]
group-base=1.0.3-0.4-29[~MySQL-python.threadsafe,~!builddocs,~glibc.tls,
~!grub.static,~!kernel.debug,~!kernel.debugdata,~!kernel.numa,~!openssh.smartcard,
~!openssh.static_libcrypto,~!postfix.mysql,sasl,~sqlite.threadsafe,~!xorg-x11.xprint
is: x86(~!mmx,~!sse2)]
ImageMagick=6.2.3.3-3.3-1
ImageMagick:data=6.2.3.3-3.3-1
ImageMagick:devel=6.2.3.3-3.3-1
ImageMagick:devellib=6.2.3.3-3.3-1
ImageMagick:doc=6.2.3.3-3.3-1
ImageMagick:lib=6.2.3.3-3.3-1
ImageMagick:perl=6.2.3.3-3.3-1
ImageMagick:runtime=6.2.3.3-3.3-1
MAKEDEV=3.19-4-0.2
MAKEDEV:doc=3.19-4-0.2
MAKEDEV:runtime=3.19-4-0.2
a2ps=4.13b-17-0.1[~!builddocs]
a2ps:data=4.13b-17-0.1[~!builddocs]
a2ps:devel=4.13b-17-0.1[~!builddocs]
a2ps:devellib=4.13b-17-0.1[~!builddocs]
...
Some related querying tasks are:
