Gentoolkit
Gentoolkit es un conjunto de herramientas que facilitan la administración de un sistema Gentoo. Este documento cubre las acciones básicas de algunas de las herramientas que ofrece Gentoolkit.
Gentoo es una distribución única y presenta algunas complejidades que simplemente no se presentan en otras distribuciones. A medida que los desarrolladores y colaboradores de Gentoo descubrían algunas de estas complejidades, escribieron herramientas para ayudar a usuarios y administradores a resolverlas. Muchas de estas herramientas se han escrito para el proyecto Gentoo y se incluyen en el paquete app-portage/gentoolkit.
Gentoolkit contiene un amplio conjunto de herramientas útiles para ayudar a administrar los paquetes y seguirle la pista a lo que ocurre en los sistemas. La mayoría de usuarios, particularmente aquellos que a menudo actualizan sus sistemas, se beneficiarán de la instalación de Gentoolkit.
The Gentoolkit commands have man pages, type "man <command>" for each command for full documentation.
Instalación
Emerge
root #
emerge --ask app-portage/gentoolkit
euse
euse is used to set (disable/enable) USE flags in make.conf, without having to edit the file directly. It is also used to get detailed information about use flags like description, status of flags (enabled/disabled), type of flag (global/local), etc.
euse es una herramienta para ver, activar y desactivar los ajustes USE en varios lugares. Para más información acerca de los ajustes USE, por favor consulte el documento sobre los ajustes USE. Lea la salida de euse -h para ver la ayuda completa y todas las opciones.
Invocation
user $
euse --help
euse (0.5.1-r1) Syntax: euse <option> [suboptions] [useflaglist] Options: -h, --help - show this message -V, --version - show version information -i, --info - show descriptions for the given useflags -I, --info-installed - show descriptions for the given useflags and their current impact on the installed system -g, --global - show only global use flags (suboption) -l, --local - show only local use flags (suboption) -a, --active - show currently active useflags and their origin -E, --enable - enable the given useflags -D, --disable - disable the given useflags -R, --remove - remove all references to the given flags from make.conf and package.use to revert to default settings -P, --prune - alias for --remove -p, --package - used with -E, -D, and -R to apply to a specific package only Notes: euse currently works for global flags defined in make.globals, make.defaults, make.conf, use.force, and use.mask and local flags defined in package.use and individual package ebuilds. It might have issues with cascaded profiles. If multiple options are specified only the last one will be used.
Ver, activar y desactivar ajustes USE
La orden euse -a lee los ajustes USE actuales que están activos y los muestra.
Hay cinco "columnas" que euse utiliza para mostrar si un ajuste está activo o inactivo y donde se ha activado cada uno de ellos. El significado del valor de las columnas es el siguiente: +/-, activado en el E ntorno, activado en make. C onf, activado en make. D efaults y activado en make. G lobals. La salida se parece a [+ECDG].
Full positive values would be [+ECDGFm]
, full negative values would be [-ecdgfM]
, full missing values would be [- ]
.
Example euse -a output (truncated):
root #
euse -a
X [+ CD ] aalib [+ ] acpi [+ C ] alsa [+ C ] apache2 [+ C ] apm [+ D ] avi [+ D ] berkdb [+ D ] bitmap-fonts [+ D ] bonobo [+ ] cdr [+ C ] crypt [+ CD ] cscope [+ C ] cups [+ CD ] curl [+ ] emboss [+ D ] encode [+ D ] esd [+ ] fam [+ ] fbcon [+ C ] firefox [+ C ] font-server [+ D ] foomaticdb [+ D ] fortran [+ D ] gd [+ C ] gdbm [+ D ] gif [+ CD ] gimpprint [+ C ] gnome [+ CD ] gphoto2 [+ ] gpm [+ CD ] gstreamer [+ C ] gtk [+ D ] gtkhtml [+ C ] guile [+ ] imagemagick [+ ] imlib [+ CD ] innodb [+ ] ipv6 [+ D ] javascript [+ C ] jpeg [+ CD ] kde [+ D ] ldap [+ ] libg++ [+ CD ] libwww [+ CD ] mad [+ CD ] mbox [+ C ] md5sum [+ C ] mikmod [+ CD ] mmx [+ C ] motif [+ CD ] mp3 [+ ] mpeg [+ CD ] mpeg4 [+ C ] mysql [+ C ] ncurses [+ CD ] nls [+ D ] nvidia [+ C ] odbc [+ ] offensive [+ ] ogg [+ CD ] opengl [+ CD ] oss [+ D ] pam [+ CD ] pdflib [+ CD ] perl [+ CD ] png [+ CD ] python [+ CD ] qt [+ D ] quicktime [+ CD ] readline [+ CD ] ruby [+ ] sdl [+ CD ] slang [+ D ] spell [+ CD ] sse [+ C ] ssl [+ CD ] svga [+ CD ] tcltk [+ C ] tcpd [+ D ] tiff [+ C ] truetype [+ CD ] usb [+ C ] vanilla [+ C ] x86 [+ C ] xml [+ ] xosd [+ C ] xv [+ CD ] xvid [+ C ] zlib [+ CD ]
Del mismo modo, se puede utilizar la orden euse -a -g para ver ajustes USE globales activos. La orden euse -a -l hace lo mismo para los ajustes USE locales activados. Las subopciones -g
y -l
de euse requieren una opción anterior a ellas (como -a
) para funcionar correctamente.
Setting, and unsetting USE flags
euse puede activar o desactivar ajustes USE. Las órdenes empleadas para ello son euse -E nombredeajuste (activa un ajuste) y euse -D nombredeajuste (desactiva un ajuste).
No utilice las órdenes euse -E ni euse -D por ellas mismas (sin un ajuste). Activarán o desactivarán TODOS los ajustes USE en /etc/portage/make.conf. Aunque se mantiene una copia de seguridad en /etc/portage/make.conf.euse_backup, por favor, ¡Tenga cuidado a la hora de usar euse -E o euse -D!
Activar un ajuste USE:
Use the -E
option to enable a USE flag.
root #
euse -E 3dfx
/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup
El fichero /etc/portage/make.conf tiene este aspecto después de ejecutar la orden:
make.conf
Después de activar el ajuste USE 3dfxUSE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \ firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \ innodb -java javascript jpeg libg++ libwww mad mbox md5sum \ mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \ ogg odbc offensive opengl pam pdflib perl png python \ quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \ vanilla X xosd xv xvid x86 zlib 3dfx"
Desactivar un ajuste USE:
Use the -D
option to remove a USE flag.
root #
euse -D 3dfx
/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup
De nuevo, el fichero /etc/portage/make.conf después de la órden:
make.conf
Después de desactivar el ajustes USE 3dfxUSE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \ firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \ innodb -java javascript jpeg libg++ libwww mad mbox md5sum \ mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \ ogg odbc offensive opengl pam pdflib perl png python \ quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \ vanilla X xosd xv xvid x86 zlib -3dfx"
euse no elimina físicamente el ajuste incluído en /etc/portage/make.conf. Añade un
-
(menos) antes del ajuste para desactivarlo. Puede necesitarse una limpieza manual de /etc/portage/make.conf para evitar variables no deseadas. Otra forma es utilizar la opción -P
(purge o eliminar) para eliminar el ajuste. Por ejemplo, euse -P 3dfx debería eliminar el ajuste 3dfx
.A disabled USE flag is not the same as the absence of the flag in make.conf. A disabled use flag will actively disable features, whereas not listing a flag at all will use the default - enabled or disabled - as set by the package maintainer.
Remove (prune) a USE flag
Use the -P
(purge) option to remove a USE flag.
root #
euse -P 3dfx
The example /etc/portage/make.conf file, after the command:
make.conf
After disabling the 3dfx USE flagUSE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \ firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \ innodb -java javascript jpeg libg++ libwww mad mbox md5sum \ mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \ ogg odbc offensive opengl pam pdflib perl png python \ quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \ vanilla X xosd xv xvid x86 zlib"
Otras herramientas
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.
Esta herramienta es el reconstructor de dependencias inversas de Gentoo. Realizará una búsqueda de todos los ebuilds instalados que no funcionen a causa de alguna actualización de un paquete del cual dependan. Puede hacer emerge de esos paquetes automáticamente pero puede ocurrir que un paquete determinado ya no funcione con las dependencias actuales instaladas, en cuyo caso, debe actualizar el paquete que no funciona a una versión más reciente. La herramienta revdep-rebuild le pasará ajustes a emerge que le permiten hacer uso de --pretend
para ver de qué paquetes se va a hacer emerge de nuevo antes de proceder.
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.
root #
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.
Para reconstruir algunos paquetes, lance revdep-rebuild sin la opción -p
y se hará emerge de nuevo de los paquetes listados.
eread
eread es una sencilla herramienta para visualizar ficheros elog creados por Portage a partir de la versión 2.1. Se puede habilitar la grabación de ficheros elog definiendo un par de variables en /etc/portage/make.conf:
make.conf
Habilitar elogPORTAGE_ELOG_CLASSES="log" PORTAGE_ELOG_SYSTEM="save"
Este es solo uno de los modos de grabar mensajes elog. Para obtener más información sobre cómo funciona el sistema elog de Portage, por favor, consulte su correspondiente página en el Manual de Portage.
Una vez se ha configurado elog de la forma deseada, se debe lanzar eread para ver los ficheros de registro.
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?
Seleccione un número y el fichero se mostrará mediante el programa de paginación especificado en la variable de entorno PAGER. Si esta variable no está definida, se utilizará less. La variable de entorno PAGER puede definirse utilizando eselect (módulo pager
).
Una vez mostrado el elemento elog, se le preguntará si desea eliminar el fichero.
eclean
eclean es una herramienta para eliminar ficheros fuente y paquetes antiguos del sistema.
Cuando se construyen e instalan los paquetes, los ficheros fuente se descargan y conservan en DISTDIR, normalmente en el directorio /usr/portage/distfiles. Esto puede acumular varios gigabytes de material a lo largo del tiempo si no se limpia periodicamente. Los usuarios deberían lanzar eclean-dist para limpiar únicamente los ficheros fuente de DISTDIR.
Es posible crear archivos de los paquetes instalados mediante quickpg o FEATURES="buildpkg"
. Estos paquetes archivados se guardan en PKGDIR, normalmente en el directorio /usr/portage/packages. Cuando no se necesitan más, o son muy antiguos, se puede lanzar eclean-pkg̣ para eliminarlos de PKGDIR. Es una buena forma de asegurarse de que el sistema tiene las últimas versiones de los paquetes binarios.
Para más información sobre eclean y los consejos sobre el mantenimiento de un sistema libre de código obsoleto, por favor, lea man eclean o eche un vistazo al artículo sobre eclean.
Vea también
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.