Q applets/zh-cn

The q applets are Article description::a collection of small, fast [[Portage query utilities written in C.]]

These are meant to offer a faster but more limited alternative to their gentoolkit counterparts.

q applets were not created to replace gentoolkit. q applets do not consider eclasses and do not provide tools like or.

Emerge
安装 q 小程序：

调用
The complete list of applications that are provided by can be listed by typing  or. Please read the man page for each utility described, as this guide is only meant to be a short reference for the most useful functions and does not include all the information about each application.

To see the available applets with a short description of their function, use :

currently defined applets: q : virtual applet qatom          : split atom strings qcheck      : verify integrity of installed packages qdepends      : show dependency info qfile     : list all pkgs owning files qgrep [pkg ...]: grep in ebuilds qkeyword : list packages based on keywords qlist      : list files owned by pkgname qlop      : emerge log analyzer qmanifest    : verify or generate thick Manifest files qmerge     : fetch and merge binary package qpkg    : create or manipulate Gentoo binpkgs qsearch        : search pkgname/desc qsize      : calculate size usage qtbz2    : manipulate tbz2 packages qtegrity    : verify files with IMA quse      : find pkgs using useflags qwhich       : find path to pkg qxpak    : manipulate xpak archives

options: -[ioemvqChV] -i, --install   * Install symlinks for applets -o, --overlays  * Print available overlays (read from repos.conf) -e, --envvar    * Print used variables and their found values -m, --masks     * Print (package.)masks for the current profile --root * Set the ROOT env var -v, --verbose   * Report full package versions, emit more elaborate output -q, --quiet     * Tighter output; suppress warnings -C, --nocolor   * Don't output color --color     * Force color in output -h, --help      * Print this help and exit -V, --version   * Print version and exit }}

如何查找文件所属的包(qfile)
命令查找文件所属的包：

Example one:

Example two:

验证包完整性 (qcheck)
要检查某些软件包安装的文件的 MD5 校验和或修改时间，请使用 应用程序：

All the files which were changed after installation will be reported here. Configuration files which have been manually edited after installation are reported too (such as the directory for OpenRC systems). Most packages do not require root permissions. However, if a package has files that are only accessible to root should be run as root.

要检查安装的所有软件包的完整性，请输入：

列出包依赖项 (qdepends)
can list the dependencies of a package in either direction. Without options to list the DEPEND, RDEPEND , PDEPEND or BDEPEND  installed dependencies, all dependencies needed by a package are displayed merged into one list. Use  to get a shell-compatible and formatted dependency output list, like found in ebuilds.

Use  to get a shell-compatible and formatted dependency output list, like found in ebuilds.

To list all of the installed packages that depend on a package use the  option.

在 ebuild 或 eclasses 中搜索模式 (qgrep)
can be used to find ebuilds that mention an ebuild's name ("libechonest" is used in the example below) which will list all packages (installed or not) which depend on some package:

The  option will limit the search to installed packages. will print the atom instead of the filename.

Listing files that belong to an ebuild (qlist)
The command gives a list of all files that belong to an ebuild.

Looking for packages that use some USE flag (quse)
Listing used USE flags is done with. In its simplest form, it lists which ebuilds use a given USE-flag.

To display the description of a USE-flag, the  option can be used. This can be combined with the  option, which takes an atom name as argument, to list all USE-flags for the given atom.

Finding package sizes (qsize)
To show the size of a package, use the application:

搜索 Portage 树 (qsearch)
One of the most powerful tools of is. This tool allows to search ebuild repositories much faster than using the command.

Here are some examples of its usage:

The homepage of packages can be queried using the  option:

In another example, let's look for a jabber client:

Extracting information from emerge logs (qlop)
allows to extract useful information from the file. It can be useful when package compilation times need to be estimated or to compare build times with other systems. It also allows to check what is compiling at the moment and how long it will probably take - which is handy when working in the console and don't have any other means to check it.

Estimate how long a build takes:

See what is emerging at the moment and how long the process has been running already:

Install binary package (qmerge)
qmerge can quickly install binary packages (binpkgs):

Defining atom fields for applet commands
Certain q applet commands / argument combinations (such as ) mention the use of atom formatting. The defintion of this formatting can be found on the qatom man page under the   argument: