This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

q applets/ko

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

Warning: Display title "q applets/ko" overrides earlier display title "Q applets".

Resources

Q 애플릿은 C로 작성한 작고 빠른 포티지 도우미 도구의 모음입니다. 이 안내서에서는 app-portage/portage-utils 꾸러미로 제공하는 도우미 도구의 일반 사용법을 다룹니다.

The app-portage/portage-utils package is a collection of very fast utilities written in C, which are meant to offer a faster but more limited alternative to their app-portage/gentoolkit counterparts. Please note that q applets are not meant to replace gentoolkit. The utilities may be much more efficient than the equivalent ones from gentoolkit and might be better suited to be used in scripts that need to call Portage repeatedly, but they do not offer the same functionality. 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

+qmanifest Build qmanifest applet, this adds additional dependencies for GPG, OpenSSL and BLAKE2B hashing
+qtegrity Build qtegrity applet, this adds additional dependencies for OpenSSL
openmp Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
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

설정

애플릿을 사용하기 전에 캐시를 우선 초기화하십시오:

root #q -r

사용법

실행

The complete list of applications that are provided by app-portage/portage-utils can be listed by typing man q or q --help. 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 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

어떤 파일을 보유한 패키지를 찾는 방법 (qfile)

The qfile command finds the package to which a file belongs:

user $qfile /etc/fonts/fonts.conf
media-libs/fontconfig (/etc/fonts/fonts.conf)
user $qfile /usr/share/keymaps/atari/atari-uk-falcon.map.gz
sys-apps/kbd (/usr/share/keymaps/atari/atari-uk-falcon.map.gz)

패키지 무결성 검증 (qcheck)

To check the MD5 sums or modification times of the files installed by some package, use the qcheck application:

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

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

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

Of course there's also an application which allows to list all the packages which depend on some package. This is done using qdepends. Use the -a option to show all the DEPEND, RDEPEND, and PDEPEND information for a package.

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

Listing all packages (installed or not) which depend on some package (qgrep)

The q applets can be used to find ebuilds that mention an ebuild's name ("libechonest" is used in the example below) with great speed:

user $qgrep -H libechonest | cut -f1 -d":" | uniq
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

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

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

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

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

Listing used USE flags is done with quse, which must be run with root permissions. It may take some time to first create/update the ebuild cache.

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

패키지 크기 찾기 (qsize)

To show the size of a package, use the qsize application:

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)

One of the most powerful tools of app-portage/portage-utils is qsearch. This tool allows to search the Portage tree much faster than using the emerge -s command.

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

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)

There is also a tool that allows to extract useful information from the emerge.log file. It is called qlop and 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's 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.

이제 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

추가 참조

  • Gentoolkit - A suite of tools to ease the administration of a Gentoo system.
  • Qcheck - A command-line tool used verify integrity of installed packages.

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, Joshua Saddler, 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.