Q applets

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Q applets and the translation is 20% complete.
Outdated translations are marked like this.

app-portage/portage-utils 꾸러미는 C로 작성한 매우 빠른 유틸리티를 모아놓은 꾸러미이며, 상당히 빠른 속도를 제공한다는 의미를 지니고 있지만, app-portage/gentoolkit의 대안이 되기에는 부족한 면이 있습니다. Q 애플릿은 gentoolkit의 대안이 아닙니다. gentoolkit보다 훨씬 효율성 높은 유틸리티가 있으며 포티지를 반복적으로 호출할 때 안성맞춤이지만 동일한 기능을 제공하지 않습니다. Q 애플릿은 eclass를 고려하지 않으며 revdep-rebuild 또는 glsa-check와 같은 도구를 제공하지 않습니다.

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 revdep-rebuild or glsa-check.

설치

USE flags

USE flags for app-portage/portage-utils Small and fast Portage helper tools written in C

openmp Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
qmanifest Build qmanifest applet, this adds additional dependencies for GPG, OpenSSL and BLAKE2B hashing
qtegrity Build qtegrity applet, this adds additional dependencies for OpenSSL
static !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

Emerge

Q 애플릿을 설치하십시오:

root #emerge --ask app-portage/portage-utils

사용법

실행

man q또는 q --help를 입력하면 app-portage/portage-utils에 있는 프로그램의 전체 목록을 볼 수 있습니다. 각각의 유틸리티를 설명한 맨 페이지를 읽어보십시오. 이 안내서는 단지 대부분 쓸모있는 기능에 대한 간단한 참고일 뿐이며 각각의 프로그램에 대한 모든 내용이 있는 것은 아닙니다.

기존 애플릿의 간단한 기능 설명을 보려면 q --help를 사용하십시오:

user $q --help
Usage: q <applet> <args>  : invoke a portage utility applet
  
Currently defined applets:
        q <applet> <args> : virtual applet
    qatom <pkg>           : split atom strings
   qcache <action> <args> : search the metadata cache
   qcheck <pkgname>       : verify integrity of installed packages
 qdepends <pkgname>       : show dependency info
    qfile <filename>      : list all pkgs owning files
    qgrep <misc args>     : grep in ebuilds
    qlist <pkgname>       : list files owned by pkgname
     qlop <pkgname>       : emerge log analyzer
   qmerge <pkgnames>      : fetch and merge binary package
     qpkg <misc args>     : manipulate Gentoo binpkgs
  qsearch <regex>         : search pkgname/desc
    qsize <pkgname>       : calculate size usage
    qtbz2 <misc args>     : manipulate tbz2 packages
     quse <useflag>       : find pkgs using useflags
    qxpak <misc args>     : manipulate xpak archives
  
Options: -[irmM:vqChV]
  -i, --install        * Install symlinks for applets
  -r, --reinitialize   * Reinitialize ebuild cache
  -m, --metacache      * Reinitialize metadata cache
  -M, --modpath  <arg> * Module path
  -v, --verbose        * Make a lot of noise
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit

currently defined applets:

        q <applet> <args> : virtual applet
    qatom <pkg>           : split atom strings
   qcheck <pkgname>       : verify integrity of installed packages
 qdepends <pkgname>       : show dependency info
    qfile <filename>      : list all pkgs owning files
    qgrep <expr> [pkg ...]: grep in ebuilds
 qkeyword <action> <args> : list packages based on keywords
    qlist <pkgname>       : list files owned by pkgname
     qlop <pkgname>       : emerge log analyzer
qmanifest <misc args>     : verify or generate thick Manifest files
   qmerge <pkgnames>      : fetch and merge binary package
     qpkg <misc args>     : create or manipulate Gentoo binpkgs
  qsearch <regex>         : search pkgname/desc
    qsize <pkgname>       : calculate size usage
    qtbz2 <misc args>     : manipulate tbz2 packages
 qtegrity <misc args>     : verify files with IMA
     quse <useflag>       : find pkgs using useflags
   qwhich <pkg ...>       : find path to pkg
    qxpak <misc args>     : 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 <arg> * 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)

qfile 명령은 지정한 파일을 포함한 꾸러미를 찾습니다:

Example one:

user $qfile /etc/fonts/fonts.conf
media-libs/fontconfig (/etc/fonts/fonts.conf)

Example two:

user $qfile /usr/share/keymaps/atari/atari-uk-falcon.map.gz
sys-apps/kbd (/usr/share/keymaps/atari/atari-uk-falcon.map.gz)

패키지 무결성 검증 (qcheck)

일부 꾸러미에서 설치한 파일의 MD5 검사합 또는 mtimes를 확인하려면 qcheck 프로그램을 사용하십시오:

user $qcheck portage-utils
Checking app-portage/portage-utils-0.1.13 ...
  * 36 out of 36 files are good

물론 설치 후에 바뀐 모든 파일을 여기에 보고합니다. 프로그램에서 설치 후 직접 편집한 설정 파일을 보고한다면, 굳이 걱정할 필요가 없습니다.

To check the integrity of all installed packages, enter:

root #qcheck

일부 패키지에 의존하는 패키지 조회 (qdepends)

참고
This shows what might be used and not necessarily is being used on a particular system. It does not always account for the USE variables of packages that are installed or in a list of alternates.

물론 일부 꾸러미에 의존하는 꾸러미의 모든 목록을 확인할 수 있게 하는 프로그램도 있습니다. qdepends를 사용하면 이 일을 해결할 수 있습니다. 꾸러미에 대한 모든 DEPEND, RDEPEND, PDEPEND 정보를 보려면 -a 플래그를 사용하십시오.

user $qdepends -a pygtk
 * DEPEND
dev-python/pygtk-2.8.2: >=dev-lang/python-2.3 >=x11-libs/gtk+-2.8.0
>=dev-libs/glib-2.8.0 >=x11-libs/pango-1.10.0 >=dev-libs/atk-1.8.0
>=gnome-base/libglade-2.5.0 >=dev-python/pycairo-0.9.0 dev-python/numeric
virtual/opengl dev-python/pyopengl >=x11-libs/gtkglarea-1.99
>=dev-util/pkgconfig-0.9 sys-devel/patch
 * RDEPEND
dev-python/pygtk-2.8.2: >=dev-lang/python-2.3 >=x11-libs/gtk+-2.8.0
>=dev-libs/glib-2.8.0 >=x11-libs/pango-1.10.0 >=dev-libs/atk-1.8.0
>=gnome-base/libglade-2.5.0 >=dev-python/pycairo-0.9.0 dev-python/numeric
virtual/opengl dev-python/pyopengl >=x11-libs/gtkglarea-1.99
 * PDEPEND

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

user $qdepends -rv mutt
mail-client/mutt-1.13.1:
RDEPEND="
    app-misc/mime-types
    virtual/libiconv
    dev-db/lmdb:0/0.9.24=
    dev-libs/libressl:0/47=
    virtual/libintl
    >=dev-libs/cyrus-sasl-2
    net-dns/libidn2
    >=app-crypt/gpgme-0.9.0:1/11=
    >=sys-libs/ncurses-5.2:0/6=
"

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

user $qdepends -Q mime-types
mail-client/mutt-1.13.1: >=app-portage/elt-patches-20170815 >=sys-devel/automake-1.15.1:1.15 dev-libs/libressl:0/47= dev-db/lmdb:0/0.9.24= virtual/libintl www-client/w3m !<sys-devel/gettext-0.18.1.1-r3 dev-libs/libxslt dev-libs/libxml2 >=sys-devel/automake-1.16.1:1.16 >=sys-devel/libtool-2.4 >=sys-devel/autoconf-2.69 net-dns/libidn2 virtual/libiconv >=app-crypt/gpgme-0.9.0:1/11= app-misc/mime-types www-client/elinks app-text/docbook-xsl-stylesheets >=dev-libs/cyrus-sasl-2 www-client/lynx net-mail/mailbase >=sys-libs/ncurses-5.2:0/6=
dev-lang/python-2.7.16: >=app-portage/elt-patches-20170815 >=sys-libs/readline-4.1:0/8= >=sys-devel/automake-1.15.1:1.15 dev-libs/libressl:0/47= virtual/libintl >=dev-db/sqlite-3.3.8:3/3= virtual/pkgconfig !<sys-devel/gettext-0.18.1.1-r3 virtual/libffi >=sys-devel/automake-1.16.1:1.16 >=dev-libs/expat-2.1 >=sys-libs/zlib-1.1.3:0/1= >=sys-devel/autoconf-2.69 >=app-eselect/eselect-python-20140125-r1 app-misc/mime-types >=sys-devel/autoconf-2.65 !!<sys-apps/portage-2.1.9 app-arch/bzip2:0/1= !sys-devel/gcc[libffi(+)] >=sys-libs/ncurses-5.2:0/6=
dev-lang/python-3.7.2: >=app-portage/elt-patches-20170815 >=sys-libs/readline-4.1:0/8= >=sys-devel/automake-1.15.1:1.15 virtual/libffi:0/7= dev-libs/libressl:0/47= virtual/libintl >=dev-db/sqlite-3.3.8:3/3= app-arch/xz-utils:0/0= virtual/pkgconfig !<sys-devel/gettext-0.18.1.1-r3 >=sys-devel/automake-1.16.1:1.16 !!<sys-apps/sandbox-2.6-r1 >=dev-libs/expat-2.1:0/0= >=sys-libs/zlib-1.1.3:0/1= >=sys-devel/autoconf-2.69 >=app-eselect/eselect-python-20140125-r1 app-misc/mime-types app-arch/bzip2:0/1= !sys-devel/gcc[libffi(+)] >=sys-libs/ncurses-5.2:0/6=
dev-lang/python-3.6.8: >=app-portage/elt-patches-20170815 >=sys-libs/readline-4.1:0/8= >=sys-devel/automake-1.15.1:1.15 virtual/libffi:0/7= dev-libs/libressl:0/47= virtual/libintl >=dev-db/sqlite-3.3.8:3/3= app-arch/xz-utils:0/0= virtual/pkgconfig !<sys-devel/gettext-0.18.1.1-r3 >=sys-devel/automake-1.16.1:1.16 !!<sys-apps/sandbox-2.6-r1 >=dev-libs/expat-2.1:0/0= >=sys-libs/zlib-1.1.3:0/1= >=sys-devel/autoconf-2.69 >=app-eselect/eselect-python-20140125-r1 app-misc/mime-types app-arch/bzip2:0/1= !sys-devel/gcc[libffi(+)] >=sys-libs/ncurses-5.2:0/6=

Search ebuilds or eclasses for a pattern (qgrep)

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:

user $qgrep -l libechonest
media-libs/libechonest/libechonest-2.0.2.ebuild
media-libs/libechonest/libechonest-2.2.0-r1.ebuild
media-libs/libechonest/libechonest-2.3.0.ebuild
media-libs/libechonest/libechonest-2.3.1.ebuild
media-libs/libechonest/libechonest-2.3.1-r1.ebuild
media-libs/libechonest/libechonest-9999.ebuild
media-sound/clementine/clementine-1.2.3.ebuild
media-sound/clementine/clementine-1.2.3-r1.ebuild
media-sound/clementine/clementine-1.3.1-r1.ebuild
media-sound/tomahawk/tomahawk-0.8.4-r3.ebuild
media-sound/tomahawk/tomahawk-9999.ebuild

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

user $qgrep -NJ net-print/cups
app-office/libreoffice-6.1.5.2: cups? ( net-print/cups )
dev-qt/qtprintsupport-5.11.3:   cups? ( >=net-print/cups-1.4 )
net-print/hplip-3.18.6: net-print/cups
net-print/hplip-3.18.6: hpijs? ( net-print/cups-filters[foomatic] )
net-print/cups-2.2.7:PDEPEND=">=net-print/cups-filters-1.0.43"
net-print/cups-filters-1.21.6:  >=net-print/cups-1.7.3
net-print/cups-filters-1.21.6:  !<=net-print/cups-1.5.9999
dev-java/icedtea-bin-3.10.0-r1: cups? ( >=net-print/cups-2.0% )
net-wireless/bluez-5.50-r2:     cups? ( net-print/cups:= )
app-text/ghostscript-gpl-9.26:  cups? ( >=net-print/cups-1.3.8 )
x11-libs/gtk+-2.24.32-r1:       cups? ( >=net-print/cups-1.7.1-r2:=[${MULTILIB_USEDEP}] )
x11-libs/gtk+-3.24.4-r1:        cups? ( >=net-print/cups-1.2[${MULTILIB_USEDEP}] )

ebuild에 포함한 파일 조회 (qlist)

qlist에서는 ebulid에서 보유한 모든 파일 목록을 제공합니다.

user $qlist vim
/usr/bin/gvim
/usr/bin/gvimdiff
/usr/bin/evim
/usr/bin/eview
/usr/bin/gview
/usr/bin/rgvim
[...]

특정 USE 플래그를 사용하는 패키지 찾기 (quse)

루트 계정으로 실행해야 하는quse 명령을 통해 시스템에서 사용한 USE 플래그를 볼 수 있습니다. 이빌드 캐시를 처음 만들고 업데이트하는데 시간이 좀 걸립니다.

user $quse firefox
app-misc/tracker/tracker-0.12.10-r1.ebuild applet doc eds elibc_glibc exif firefox-bookmarks flac flickr gif
[...]

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

user $quse -Dvp autogen
sys-devel/autogen-5.18.16-r1
  libopts       install the libopts tarball (a few packages want this for developing)
  static-libs   Build static versions of dynamic libraries as well

패키지 크기 찾기 (qsize)

꾸러미 크기를 알아보려면 qsize 프로그램을 사용하십시오:

user $qsize vim
app-editors/gvim-6.4: 10 files, 7 non-files, 2327.516 KB
app-editors/vim-6.4: 6 files, 2 non-files, 2058.14 KB
app-editors/vim-core-6.4: 1024 files, 68 non-files, 10950.984 KB
[...]

포티지 트리 검색 (qsearch)

app-portage/portage-utils의 강력한 도구중 하나로 qsearch가 있습니다. 이 도구는 emerge -s보다 더 훨씬 빠르게 포티지 트리를 검색할 수 있습니다.

사용방법에 대해 약간의 예제를 보도록 하겠습니다:

user $qsearch terminus
media-fonts/terminus-font A clean fixed font for the console and X11

꾸러미의 홈페이지는 -H 옵션으로 요청할 수 있습니다:

user $qsearch -H terminus
media-fonts/terminus-font http://www.is-vn.bg/hamster/jimmy-en.html

다른 예를 들자면, 재버 클라이언트를 살펴보겠습니다:

user $qsearch -S "jabber client"
app-emacs/emacs-jabber A Jabber client for Emacs.
net-im/gajim Jabber client written in PyGTK
net-im/gnome-jabber Gnome Jabber Client
net-im/gossip Lightweight Jabber client for GNOME
net-im/imcom Python commandline Jabber Client
net-im/psi QT 3.x Jabber Client, with Licq-like interface
net-im/tkabber Featureful Jabber client for tcl/tk.
x11-themes/psi-themes Iconsets for Psi, a QT 3.x Jabber Client

emerge 기록에서 정보 빼내기 (qlop)

emerge.log 파일에서 쓸모있는 정보를 빼내는 도구가 있습니다. qlop이라고 하며 꾸러미 컴파일 시간을 추정하거나 다른 시스템과 빌드 시간을 비교할 때 유용합니다. 그때그때 어떤 패키지를 컴파일 했고 얼마나 시간이 걸릴 지 확인할 수 있기도 합니다 - 콘솔에서 작업할 때나 간편합니다. 이를 확인하는데 다른 의미는 없습니다.

이제 dev-lang/perl을 빌드하는 시간이 보통 얼마나 걸리는지 살펴보겠습니다:

user $qlop -tH perl
perl: 7 minutes, 52 seconds for 4 merges

이제 잠깐동안 어떤 패키지를 이머지 했는지, 프로세스를 처리하는데 걸린 시간이 얼마나 되는지 보도록 하겠습니다:

user $qlop -c
* perl-5.8.8-r23
    started: Mon May 21 12:41:11 2007
    elapsed: 19 seconds

Install binary package (qmerge)

qmerge can quickly install binary packages (binpkgs):

user $qmerge sys-apps/sed
[R] sys-apps/sed-4.8

Create or manipulate binary package (qpkg)

qpkg is used to create or clean up Gentoo binary packages.

경고
qpkg used to be a gentoolkit command for querying packages, there is still much outdated documentation on that command to be found on the Internet. See equery.
참고
Not to be confused with quickpkg.

qsearch

List the descriptions of every package in the cache
user $qsearch --all .
Regex search package basenames
user $qsearch --search <regex>
Regex search package descriptions (or homepage when using -H)
user $qsearch --desc <arg>
Only show package name
user $qsearch --name-only <package>
Show homepage info instead of description
user $qsearch --homepage gentoo.org
Show repository the ebuild originates from
user $qsearch --repo gentoo
Print matched atom using given format string
user $qsearch --format <arg>
Set the ROOT env va
user $qsearch --root <arg>
Report full package versions, emit more elaborate output
user $qsearch --verbose syslog-ng
Tighter output; suppress warnings
user $qsearch --quiet <package>
Don't output color
user $qsearch --nocolor package>
Force color in output
참고
Colors is default enabled
user $qsearch --color <package>
Print current qsearch version
user $qsearch --version

quse

Print version and exit
user $quse --version
Print this help and exit
user $quse --help
Force color in output
user $quse --color
Don't output color
user $quse --nocolor
Tighter output; suppress warnings
user $quse --quiet <package>
Report full package versions, emit more elaborate output
user $quse --verbose <package>
Set the ROOT env var
user $quse --root <arg>
Print matched atom using given format string
user $quse --format <arg>
Show repository the ebuild originates from
user $quse --repo
Restrict matching to package or category
user $quse --package <arg>
Only search installed packages
user $quse --installed
Describe all USE flags
user $quse --describe .
Use the LICENSE vs IUSE
참고
Including a dot (.) will list all licenses available
user $quse --license .
List all ebuilds, don't match anything
user $quse --all
Show exact non regexp matching using strcmp
user $quse --exact useflag

Troubleshooting

Defining atom fields for applet commands

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

user $man 1 qatom

추가 참조

  • Gentoolkit - 젠투 시스템 관리 작업을 용이하게 돕는 도구 모음.
  • Qcheck - 설치한 꾸러미의 무결성을 검증하는데 사용하는 명령행 도구.

This page is based on a document formerly found on our main website gentoo.org.
The following people contributed to the original document: Łukasz Damentko, , and Marcelo Góes
They are listed here because wiki history does not allow for any external attribution. If you edit the wiki article, please do not add yourself here; your contributions are recorded on each article's associated history page.