Gentoolkit
emerge — configuration — ebuild repository — dispatch-conf
world file — USE flags — ebuilds — profiles
upgrades — using testing packages — binary packages
tools — gentoolkit — eselect
Portage FAQ — cheat sheet — FAQ
all articles
Gentoolkit是一套简化Gentoo系统管理的工具。本文档介绍了Gentoolkit中的一些工具的基础知识。
Gentoo是一款独特的发行版,它呈现了一些对于其他发行版根本不存在的复杂性。由于Gentoo开发人员和贡献者发现了其中的一些复杂性,他们还编写了一些工具来帮助用户和管理员解决这些问题。许多工具已经贡献给Gentoo项目,并包含在app-portage/gentoolkit包中。
Gentoolkit包含大量有用的工具,可帮助用户管理包并跟踪系统中发生的情况。 大多数用户(特别是经常更新系统的用户)将从安装Gentoolkit中受益。
The gentoolkit commands have man pages, type "man <command>" for each command for full documentation.
安装
USE flags
USE flags for app-portage/gentoolkit Collection of administration scripts for Gentoo
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
Emerge
Install gentoolkit:
root #
emerge --ask app-portage/gentoolkit
eclean
eclean是一个从系统中删除旧源文件和旧二进制包的工具。
构建和安装包时,源文件将下载并保存在 DISTDIR 中,通常是 /var/cache/distfiles。如果不定期清洁,这可能会累积数千兆字节的材料。用户应该运行 eclean-dist 来清理 DISTDIR 中的源文件。
可以使用 quickpkg 或 FEATURES="buildpkg"
创建已安装软件包的存档。这些存档的包保存在 PKGDIR 中,通常是 /var/cache/binpkgs。当它们不再需要时,或者它们太旧时,可以运行 eclean-pkg 将它们从 PKGDIR 中移除,这是确保系统上的任何二进制包只是最新版本的好方法。
有关eclean的更多信息以及维护无残留系统的提示,请阅读man eclean或查看eclean文章。
epkginfo
epkginfo is a tool used to display package metadata information. It is a shortcut to using the equery meta command.
equery
equery is a tool to make several common Portage operations simpler. Among other operations, it can display package dependencies, metadata, and installed files.
eread
eread是一个简单的工具,用于显示自2.1版以来Portage生成的elog文件,可以通过在/etc/portage/make.conf中设置几个变量来启用elog文件的保存:
PORTAGE_ELOG_CLASSES="log"
PORTAGE_ELOG_SYSTEM="save"
这只是保存elog消息的一种方法。 有关Portage elog系统如何工作的更多信息,请参阅Portage手册中的相应页面。
一旦elog设置满意,运行eread查看日志文件。
user $
eread
This is a list of portage log items. Choose a number to view that file or type q to quit. 1) app-portage:gentoolkit-0.2.4_pre2:20070320-000256.log 2) app-portage:gentoolkit-0.2.4_pre2:20070320-000258.log 3) app-portage:gentoolkit-0.2.4_pre2:20070320-000319.log 4) app-portage:gentoolkit-0.2.3:20070320-000408.log Choice?
选择一个数字,将使用PAGER环境变量中指定的分页程序显示该文件。如果没有设置PAGER,将使用less。可以使用eselect(pager
模块)设置PAGER环境变量。
显示elog项目后,系统将提示您是否要删除该文件。
eshowkw
Display keywords for specified package or for package that is in pwd.
To show keywords for a specific package, indicate that package on the command line, for example:
root #
eshowkw gentoo-sources
Keywords for sys-kernel/gentoo-sources: | | u | | a a p s l r a | n | | m r h p p i o i s l m m | e u s | r | d a m p p c a x a o s 3 p 6 i | a s l | e | 6 r 6 p p 6 r 8 6 n c 9 h 8 p | p e o | p | 4 m 4 a c 4 c 6 4 g v 0 a k s | i d t | o ----------+-------------------------------+--------------+------- 4.14.302 | o o o o o o + o o o o o o o o | 8 o 4.14.302 | gentoo ----------+-------------------------------+--------------+------- 4.14.305 | + + + ~ + + ~ + ~ o o ~ ~ ~ ~ | 8 o 4.14.305 | gentoo ----------+-------------------------------+--------------+------- 4.14.309 | + ~ ~ + ~ + ~ + ~ o ~ ~ ~ ~ ~ | 8 o 4.14.309 | gentoo ----------+-------------------------------+--------------+------- 4.14.311 | ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ ~ ~ | 8 o 4.14.311 | gentoo ----------+-------------------------------+--------------+------- 4.14.312 | ~ ~ ~ ~ ~ ~ ~ ~ ~ o ~ ~ ~ ~ ~ | 8 o 4.14.312 | gentoo
euse
euse provides functionality to set (disable/enable) and obtain information about USE flags in make.conf, without having to edit the file directly.
revdep-rebuild
It is not necessary to run this tool for general use. The portage FEATURE preserve-libs makes the original purpose obsolete. The primary purpose of this tool is now ABI changes for specific libraries when instructions are provided by developers.
这个工具是Gentoo的反向依赖重建器,它将扫描已安装的ebuild,以查找因其所依赖的软件包升级而损坏的软件包。它可以自动为用户安装这些包,但也可能发生给定包不能与当前安装的依赖项一起使用,在这种情况下,您应该将损坏的包升级到更新的版本。revdep-rebuild会将标志传递给emerge,它允许你使用--pretend
标志来查看将要再次出现的内容。
revdep-rebuild will pass flags to emerge which lets the --pretend
flag pass through, to see what is going to be emerged again before going any further.
user $
revdep-rebuild -p
* Configuring search environment for revdep-rebuild * Checking reverse dependencies * Packages containing binaries and libraries broken by a package update * will be emerged. * Collecting system binaries and libraries * Generated new 1_files.rr * Collecting complete LD_LIBRARY_PATH * Generated new 2_ldpath.rr * Checking dynamic linking consistency [ 48% ] * broken /usr/lib/gstreamer-0.10/libgsttaglib.la (requires /usr/lib/libtag.la) [ 64% ] * broken /usr/lib/libgdkglext-x11-1.0.la (requires /usr/lib/libGLU.la) [ 67% ] * broken /usr/lib/libgtkglext-x11-1.0.la (requires /usr/lib/libGLU.la) [ 85% ] * broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la (requires /usr/lib/libGLU.la) * broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la (requires /usr/lib/libGLU.la) [ 97% ] * broken /usr/qt/3/lib/libqt-mt.la (requires -lpng) [ 100% ] * Generated new 3_broken.rr * Assigning files to packages * /usr/lib/gstreamer-0.10/libgsttaglib.la -> media-plugins/gst-plugins-taglib * /usr/lib/libgdkglext-x11-1.0.la -> x11-libs/gtkglext * /usr/lib/libgtkglext-x11-1.0.la -> x11-libs/gtkglext * /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la -> dev-python/pygtkglext * /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la -> dev-python/pygtkglext * /usr/qt/3/lib/libqt-mt.la -> x11-libs/qt * Generated new 4_raw.rr and 4_owners.rr * Cleaning list of packages to rebuild * Generated new 4_pkgs.rr * Assigning packages to ebuilds * Generated new 4_ebuilds.rr * Evaluating package order * Generated new 5_order.rr * All prepared. Starting rebuild emerge --oneshot --pretend dev-python/pygtkglext:0 media-plugins/gst-plugins-taglib:0.10 x11-libs/gtkglext:0 x11-libs/qt:3 These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-plugins/gst-plugins-taglib-0.10.17 [ebuild R ] x11-libs/gtkglext-1.2.0 [ebuild R ] x11-libs/qt-3.3.8b-r2 [ebuild R ] dev-python/pygtkglext-1.1.0 * Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
要重建某些软件包,请运行revdep-rebuild而不使用-p
标志,列表中的包将会被安装。
root #
revdep-rebuild
Other tools
gentoolkit also provides other tools:
Name | Description |
---|---|
ebump | Ebuild revision bumper (more useful for developers). |
enalyze | Gentoo's installed packages analysis and repair tool. See man page, which states "CAUTION: This is beta software and is not yet feature complete". |
imlate | Displays candidates for keywords for an architecture (more useful for developers?). |
See the man pages for each of these tools for more info.
另请参阅
This page is based on a document formerly found on our main website gentoo.org.
The following people contributed to the original document: Matt Butcher, John P. Davis, Erwin, Shyam Mani, Xavier Neys, Karl Trygve, José Luis Rivero, Joshua Saddler, Douglas Anderson
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.