/[gentoo]/xml/htdocs/doc/en/gentoolkit.xml
Gentoo

Contents of /xml/htdocs/doc/en/gentoolkit.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations) (download) (as text)
Thu Apr 7 17:58:39 2005 UTC (9 years, 7 months ago) by swift
Branch: MAIN
Changes since 1.18: +178 -42 lines
File MIME type: application/xml
#86937 - euse updates + warning about brokenness

1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.18 2004/12/27 20:32:02 swift Exp $ -->
3 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
5 <guide link="/doc/en/gentoolkit.xml">
6 <title>Gentoolkit</title>
7
8 <author title="Author">
9 <mail link="mbutcher@aleph-null.tv">Matt Butcher</mail>
10 </author>
11 <author title="Editor">
12 <!-- zhen@gentoo.org -->John P. Davis
13 </author>
14 <author title="Editor">
15 <mail link="erwin@gentoo.org">Erwin</mail>
16 </author>
17 <author title="Editor">
18 <mail link="fox2mike@gmail.com">Shyam Mani</mail>
19 </author>
20 <author title="Editor">
21 <mail link="neysx@gentoo.org">Xavier Neys</mail>
22 </author>
23
24 <!-- Licensed under GFDL -->
25
26 <abstract>
27 Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
28 This document covers the basics of some of the tools present in Gentoolkit.
29 </abstract>
30
31 <version>1.6</version>
32 <date>2005-04-07</date>
33
34 <chapter>
35 <title>Introduction</title>
36 <section>
37 <title>What is Gentoolkit?</title>
38 <body>
39
40 <p>
41 Gentoo is a unique distribution and presents some complexities that simply
42 don't exist for other distributions. As Gentoo developers and contributors
43 discovered some of these complexities, they also wrote tools to help users and
44 administrators work around them. Many of these tools have been contributed to
45 the Gentoo project and are included in the package
46 <c>app-portage/gentoolkit</c>.
47 </p>
48
49 <note>
50 As of now, there are two versions of gentoolkit: <c>app-portage/gentoolkit</c>
51 and <c>app-portage/gentoolkit-dev</c>. While the former contains administration
52 scripts, the latter contains scripts specific to help development on Gentoo.
53 This document discusses gentoolkit only.
54 </note>
55
56 <p>
57 Gentoolkit contains a whole bunch of useful tools to help manage your packages
58 and keep track of what is going on in your system. Most users --&nbsp;particularly
59 those who update systems often&nbsp;-- will benefit from having gentoolkit
60 installed.
61 </p>
62
63 </body>
64 </section>
65 <section>
66 <title>Installation</title>
67 <body>
68
69 <p>
70 Just as with any Gentoo package, installation is just a simple emerge.
71 </p>
72
73 <pre caption="Getting gentoolkit">
74 # <i>emerge gentoolkit</i>
75 </pre>
76
77 <note>
78 Many of the tools in gentoolkit reveal important information about your system
79 or require root privilege. For that reason, some of the programs may only be
80 executed (or only function properly) if run by a user with root permission.
81 </note>
82
83 </body>
84 </section>
85 <section>
86 <title>Finding Documentation</title>
87 <body>
88
89 <p>
90 Any documentation that a program might have (other than man pages) is stored in
91 <path>/usr/doc/gentoolkit-[version]/[program-name]/</path>.
92 </p>
93
94 </body>
95 </section>
96 </chapter>
97
98 <chapter>
99 <title>equery</title>
100 <section>
101 <title>Introduction</title>
102 <body>
103
104 <p>
105 <c>equery</c> is a tool that supports features that <c>epm</c> (and the
106 deprecated <c>qpkg</c>) has but has its own set of features that make it
107 really useful. <c>equery --help</c> gives you the full set of options.
108 <c>equery</c> will eventually replace <c>etcat</c> at some point of time.
109 </p>
110
111 <note>
112 Not all features listed by <c>equery --help</c> have been implemented yet.
113 Those that have not been, are mentioned clearly.
114 </note>
115
116 </body>
117 </section>
118 <section>
119 <title>Finding out Package Sizes</title>
120 <body>
121
122 <p>
123 Ever been curious to find out how much space a specific package is occupying?
124 Since a package could have its files over a number of directories, the usual
125 <c>du -hc</c> might not give you the correct figure. Not to worry, here comes
126 <c>equery</c> to the rescue!
127 </p>
128
129 <pre caption="Package Size">
130 # <i>equery size openoffice-bin</i>
131 * app-office/openoffice-bin-1.1.2
132 Total Files : 2908
133 Total Size : 223353.31 KiB
134 </pre>
135
136 <p>
137 As you can see, <c>equery</c> prints the total space used in kilobytes and also
138 lists the total number of files the package has.
139 </p>
140
141 </body>
142 </section>
143 <section>
144 <title>Package-wise list of USE Flags</title>
145 <body>
146
147 <p>
148 <c>equery</c> can be used to give us information about what USE flags are being
149 used by a specific package. It tells us what our current USE flags are for a
150 package and what USE flags are available for the package.
151 </p>
152
153 <pre caption="Set and Unset USE Flags">
154 # <i>equery uses ethereal</i>
155 [ Colour Code : set unset ]
156 [ Legend : (U) Col 1 - Current USE flags ]
157 [ : (I) Col 2 - Installed With USE flags ]
158
159 U I [ Found these USE variables in : net-analyzer/ethereal-0.10.6 ]
160 - - adns : Adds support for the adns DNS client library
161 + + gtk : Adds support for x11-libs/gtk+ (The GIMP Toolkit)
162 - - ipv6 : Adds support for IP version 6
163 - - snmp : Adds support for the Simple Network Management Protocol if available
164 + + ssl : Adds support for Secure Socket Layer connections
165 + + gtk2 : Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports both.
166 - - debug : Tells configure and the makefiles to build for debugging. Effects vary across packages,
167 but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too
168 </pre>
169
170 <p>
171 I have installed ethereal with only the gtk, ssl and gtk2 flags set, but the
172 other USE flags for ethereal are adns, ipv6, snmp and debug. For more
173 information on USE flags, please refer to the <uri
174 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>
175 chapter of the <uri link="/doc/en/handbook/">Gentoo Handbook</uri>.
176 </p>
177
178 </body>
179 </section>
180 <section>
181 <title>Where's the ebuild?</title>
182 <body>
183
184 <p>
185 We can also find out which ebuild is being used for a specific package using
186 <c>equery</c>. This is done my using the <c>equery which</c> command which
187 displays the full path to the ebuild.
188 </p>
189
190 <pre caption="Displaying the ebuild path">
191 # <i>equery which cdrtools</i>
192 /usr/portage/app-cdr/cdrtools/cdrtools-2.01_alpha37.ebuild
193 </pre>
194
195 </body>
196 </section>
197 <section>
198 <title>Dependency Graphs</title>
199 <body>
200
201 <p>
202 <c>equery</c> is capable of giving us a dependency graph for a specified package.
203 The dependency graph gives a listing of all the packages that have direct and
204 indirect dependencies on the package in question.
205 </p>
206
207 <pre caption="Dependency Graph for cdrtools">
208 # <i>equery depgraph cdrtools</i>
209 Displaying dependencies for app-cdr/cdrtools-2.01_alpha37
210 `-- app-cdr/cdrtools-2.01_alpha37
211 `-- sys-libs/glibc-2.3.4.20040808 (virtual/libc)
212 `-- sys-kernel/linux-headers-2.4.22 (virtual/os-headers)
213 `-- sys-apps/baselayout-1.10.4
214 `-- sys-apps/sysvinit-2.85-r1
215 `-- sys-apps/gawk-3.1.3-r1
216 `-- sys-apps/util-linux-2.12-r4
217 `-- sys-apps/sed-4.0.9
218 `-- sys-libs/ncurses-5.4-r4
219 `-- sys-apps/pam-login-3.14
220 `-- sys-libs/pam-0.77-r1
221 `-- sys-libs/cracklib-2.7-r10
222 `-- sys-apps/miscfiles-1.3-r1
223 `-- app-arch/gzip-1.3.5-r1
224 `-- sys-apps/portage-2.0.50-r10
225 </pre>
226
227 <p>
228 For example, while glibc may be a direct dependency for cdrtools, the linux-headers
229 are an indirect dependency for cdrtools.
230 </p>
231
232 </body>
233 </section>
234 </chapter>
235
236 <chapter>
237 <title>euse</title>
238 <section>
239 <title>Introduction</title>
240 <body>
241
242 <warn>
243 <c>euse</c> is currently broken as it does not support cascading profiles well.
244 </warn>
245
246 <p>
247 <c>euse</c> is a tool to see, set and unset USE flags at various places. For
248 more information on USE flags, please refer to the <uri
249 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>.
250 Please see <c>euse -h</c> for complete help and all options.
251 </p>
252
253 </body>
254 </section>
255 <section>
256 <title>Viewing, Setting and Unsetting USE Flags</title>
257 <body>
258
259 <p>
260 The <c>euse -a</c> command reads the current active USE flags and displays
261 them.
262 </p>
263
264 <note>
265 There are 5 &quot;columns&quot; that <c>euse</c> now uses to show whether a
266 flag is set/unset and where all the flag has been set. The columns are as
267 follows -- +/-, set in the Environment, set in make.Conf, set in make.Defaults,
268 and set in make.Globals. The output looks like [+ECDG].
269 </note>
270
271 <pre caption="Viewing all active USE flags">
272 # <i> euse -a</i>
273 X [+ CD ]
274 aalib [+ ]
275 acpi [+ C ]
276 alsa [+ C ]
277 apache2 [+ C ]
278 apm [+ D ]
279 avi [+ D ]
280 berkdb [+ D ]
281 bitmap-fonts [+ D ]
282 bonobo [+ ]
283 cdr [+ C ]
284 crypt [+ CD ]
285 cscope [+ C ]
286 cups [+ CD ]
287 curl [+ ]
288 emboss [+ D ]
289 encode [+ D ]
290 esd [+ ]
291 ethereal [+ C ]
292 fam [+ ]
293 fbcon [+ C ]
294 font-server [+ D ]
295 foomaticdb [+ D ]
296 fortran [+ D ]
297 gd [+ C ]
298 gdbm [+ D ]
299 gif [+ CD ]
300 gimpprint [+ C ]
301 gnome [+ CD ]
302 gphoto2 [+ ]
303 gpm [+ CD ]
304 gstreamer [+ C ]
305 gtk [+ D ]
306 gtk2 [+ CD ]
307 gtkhtml [+ C ]
308 guile [+ ]
309 imagemagick [+ ]
310 imlib [+ CD ]
311 imlib2 [+ ]
312 innodb [+ ]
313 ipv6 [+ D ]
314 javascript [+ C ]
315 jpeg [+ CD ]
316 kde [+ D ]
317 ldap [+ ]
318 libg++ [+ CD ]
319 libwww [+ CD ]
320 mad [+ CD ]
321 mbox [+ C ]
322 md5sum [+ C ]
323 mikmod [+ CD ]
324 mmx [+ C ]
325 motif [+ CD ]
326 mozilla [+ C ]
327 mp3 [+ ]
328 mpeg [+ CD ]
329 mpeg4 [+ C ]
330 mysql [+ C ]
331 ncurses [+ CD ]
332 nls [+ D ]
333 nvidia [+ C ]
334 odbc [+ ]
335 offensive [+ ]
336 oggvorbis [+ CD ]
337 opengl [+ CD ]
338 oss [+ D ]
339 pam [+ CD ]
340 pdflib [+ CD ]
341 perl [+ CD ]
342 png [+ CD ]
343 python [+ CD ]
344 qt [+ D ]
345 quicktime [+ CD ]
346 readline [+ CD ]
347 ruby [+ ]
348 sdl [+ CD ]
349 slang [+ D ]
350 spell [+ CD ]
351 sse [+ C ]
352 ssl [+ CD ]
353 svga [+ CD ]
354 tcltk [+ C ]
355 tcpd [+ D ]
356 tiff [+ C ]
357 truetype [+ CD ]
358 truetype-fonts [+ D ]
359 type1-fonts [+ D ]
360 usb [+ C ]
361 vanilla [+ C ]
362 x86 [+ C ]
363 xml [+ ]
364 xml2 [+ D ]
365 xmms [+ D ]
366 xosd [+ C ]
367 xv [+ CD ]
368 xvid [+ C ]
369 zlib [+ CD ]
370 </pre>
371
372 <p>
373 Similarly you can use the <c>euse -a -g</c> command to only view active global
374 USE flags. The <c>euse -a -l</c> command does the same for active local USE
375 flags.<c>-g</c> &amp; <c>-l</c> are suboptions to <c>euse</c> and need an
376 option before them (like <c>-a</c>) to function correctly.
377 </p>
378
379 <pre caption="Viewing active local USE flags">
380 # <i>euse -a -l</i>
381 bitmap-fonts [+ D ]
382 font-server [+ D ]
383 fortran [+ D ]
384 gimpprint [+ C ]
385 imlib2 [+ ]
386 md5sum [+ C ]
387 mpeg4 [+ C ]
388 nvidia [+ C ]
389 offensive [+ ]
390 truetype [+ CD ]
391 truetype-fonts [+ D ]
392 type1-fonts [+ D ]
393 </pre>
394
395 <p>
396 We can also use <c>euse</c> to set or unset use flags. The commands used for
397 this are <c>euse -E flagname</c> (enable a flag) and <c>euse -D flagname</c>
398 (disable a flag).
399 </p>
400
401 <warn>
402 Do not use the <c>euse -E</c> or <c>euse -D</c> commands by themselves (without
403 a flag). It will set/unset ALL USE flags in <c>/etc/make.conf</c>. Although a
404 backup is kept at <path>/etc/make.conf.euse_backup</path>, please be careful
405 while using <c>euse -E</c> or <c>euse -D</c>.
406 </warn>
407
408 <pre caption="Setting and Unsetting USE flags">
409 <comment>(Enabling a USE Flag)</comment>
410 # <i> euse -E 3dfx</i>
411 /etc/make.conf was modified, a backup copy has been placed at /etc/make.conf.euse_backup
412
413 <comment>(/etc/make.conf after the command)</comment>
414 USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc ethereal fbcon gd \
415 gif gimpprint gnome gpm gstreamer gtk2 gtkhtml imlib imlib2 \
416 innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
417 mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses nvidia \
418 oggvorbis odbc offensive opengl pam pdflib perl png python \
419 quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
420 vanilla X xml2 xmms xosd xv xvid x86 zlib 3dfx"
421
422 <comment>(Disabling the USE Flag)</comment>
423 # <i> euse -D 3dfx</i>
424 /etc/make.conf was modified, a backup copy has been placed at /etc/make.conf.euse_backup
425
426 <comment>(/etc/make.conf after the command)</comment>
427 USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc ethereal fbcon gd \
428 gif gimpprint gnome gpm gstreamer gtk2 gtkhtml imlib imlib2 \
429 innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
430 mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses nvidia \
431 oggvorbis odbc offensive opengl pam pdflib perl png python \
432 quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
433 vanilla X xml2 xmms xosd xv xvid x86 zlib -3dfx"
434 </pre>
435
436 <note>
437 <c>euse</c> does not physically remove the flag from make.conf. It just adds a
438 - (minus) before the flag to unset it. You may have to manually clean up your
439 make.conf to avoid unwanted variables.
440 </note>
441
442 </body>
443 </section>
444 </chapter>
445
446 <chapter>
447 <title>Other tools</title>
448 <section>
449 <title>revdep-rebuild</title>
450 <body>
451
452 <p>
453 This tool is Gentoo's Reverse Dependency rebuilder. It will scan your installed
454 ebuilds to find packages that have become broken as a result of an upgrade of a
455 package they depend on. It can emerge those packages for you but it can also
456 happen that a given package does not work anymore with the currently installed
457 dependencies, in which case you should upgrade the broken package to a more
458 recent version. revdep-rebuild will pass flags to emerge which lets you use the
459 <c>--pretend</c> flag to see what is going to be emerged again before you go any
460 further.
461 </p>
462
463 <pre caption="Running revdep-rebuild in pretend mode">
464 # <i>revdep-rebuild -p</i>
465
466 Checking reverse dependencies...
467 Packages containing binaries and libraries broken by any package update,
468 will be recompiled.
469
470 Collecting system binaries and libraries... done.
471 (/root/.revdep-rebuild.1_files)
472
473 Collecting complete LD_LIBRARY_PATH... done.
474 (/root/.revdep-rebuild.2_ldpath)
475
476 Checking dynamic linking consistency...
477 broken /usr/lib/ao/plugins-2/libarts.so (requires libartsc.so.0)
478 broken /usr/lib/kde3/libkpresenterpart.so (requires libartskde.so.1 libqtmcop.so.1
479 libsoundserver_idl.so.1 libkmedia2_idl.so.1 libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
480 broken /usr/lib/ruby/site_ruby/1.8/i686-linux/fox.so (requires libFOX-1.0.so.0)
481 broken /usr/lib/xine/plugins/1.0.0/xineplug_ao_out_arts.so (requires libartsc.so.0)
482 broken /usr/lib/perl5/vendor_perl/5.8.0/i686-linux/auto/SDL_perl/SDL_perl.so (requires libSDL_gfx.so.0)
483 broken /usr/lib/libloudmouth-1.so.0.0.0 (requires libgnutls.so.10)
484 broken /usr/bin/k3b (requires libartskde.so.1 libqtmcop.so.1 libsoundserver_idl.so.1 libkmedia2_idl.so.1
485 libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
486 broken /usr/bin/lua (requires libhistory.so.4)
487 broken /usr/bin/lyx (requires libAiksaurus-1.0.so.0)
488 broken /usr/bin/luac (requires libhistory.so.4)
489 broken /usr/bin/avidemux2 (requires libartsc.so.0)
490 broken /usr/bin/pptout (requires libxml++-0.1.so.11)
491 broken /usr/bin/xml2ps (requires libxml++-0.1.so.11)
492 done.
493 (/root/.revdep-rebuild.3_rebuild)
494
495 Assigning files to ebuilds... done.
496 (/root/.revdep-rebuild.4_ebuilds)
497
498 Evaluating package order... done.
499 (/root/.revdep-rebuild.5_order)
500
501 All prepared. Starting rebuild...
502 emerge --oneshot --nodeps -p =app-cdr/k3b-0.11.14 =app-office/koffice-1.3.2 =app-office/lyx-1.3.4 \
503 =app-office/passepartout-0.2 =dev-lang/lua-5.0.2 =dev-ruby/fxruby-1.0.29 =media-libs/libao-0.8.5 \
504 =media-libs/xine-lib-1_rc5-r3 =media-video/avidemux-2.0.26 =net-libs/loudmouth-0.16
505
506 These are the packages that I would merge, in order:
507
508 Calculating dependencies ...done!
509 [ebuild R ] app-cdr/k3b-0.11.14
510 [ebuild R ] app-office/koffice-1.3.2
511 [ebuild R ] app-office/lyx-1.3.4
512 [ebuild R ] app-office/passepartout-0.2
513 [ebuild R ] dev-lang/lua-5.0.2
514 [ebuild R ] dev-ruby/fxruby-1.0.29
515 [ebuild R ] media-libs/libao-0.8.5
516 [ebuild R ] media-libs/xine-lib-1_rc5-r3
517 [ebuild R ] media-video/avidemux-2.0.26
518 [ebuild R ] net-libs/loudmouth-0.16
519
520 Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
521 </pre>
522
523 <p>
524 If you need to rebuild some packages, you may run <c>revdep-rebuild</c> without
525 the <c>-p</c> flag and the listed packages will be emerged again.
526 </p>
527
528 </body>
529 </section>
530
531 <section>
532 <title>glsa-check</title>
533 <body>
534
535 <p>
536 <c>glsa-check</c> is mainly a test tool that keeps track of the various GLSA's
537 (Gentoo Linux Security Advisory) and will eventually be integrated into
538 <c>emerge</c> and <c>equery</c>. For more information, please visit the <uri
539 link="/proj/en/portage/glsa-integration.xml">Portage GLSA Integration
540 Page</uri>.
541 </p>
542
543 </body>
544 </section>
545 </chapter>
546
547 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20