/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-portage.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-portage.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.51 Revision 1.67
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.51 2005/05/17 14:39:26 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.67 2007/11/01 01:28:56 jkt Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract>
12This chapter explains the "simple" steps a user definitely needs to know to
13maintain the software on his system.
14</abstract>
15
11<version>1.46</version> 16<version>1.60</version>
12<date>2005-05-17</date> 17<date>2007-11-01</date>
13 18
14<section> 19<section>
15<title>Welcome to Portage</title> 20<title>Welcome to Portage</title>
16<body> 21<body>
17 22
178</pre> 183</pre>
179 184
180</body> 185</body>
181</subsection> 186</subsection>
182<subsection> 187<subsection>
188<title>Finding Installed Package Documentation</title>
189<body>
190
191<p>
192Many packages come with their own documentation. Sometimes, the <c>doc</c> USE
193flag determines whether the package documentation should be installed or not.
194You can check the existence of a <c>doc</c> USE flag with the <c>emerge -vp
195&lt;package name&gt;</c> command.
196</p>
197
198<pre caption="Checking the existence of a doc USE flag">
199<comment>(alsa-lib is just an example, of course.)</comment>
200# <i>emerge -vp alsa-lib</i>
201[ebuild N ] media-libs/alsa-lib-1.0.14_rc1 -debug +doc 698 kB
202</pre>
203
204<p>
205The best way of enabling the <c>doc</c> USE flag is doing it on a per-package
206basis via the <path>/etc/portage/package.use</path> file, so that you get
207documentation only for packages that you are interested in. Enabling this flag
208globally is known to cause problems with circular dependencies. For more
209information, please read the <uri link="?part=2&amp;chap=2">USE Flags</uri>
210chapter.
211</p>
212
213<p>
214Once the package installed, its documentation is generally found in a
215subdirectory named after the package under the <path>/usr/share/doc</path>
216directory. You can also list all installed files with the <c>equery</c> tool
217which is part of the <c>app-portage/gentoolkit</c> <uri
218link="/doc/en/gentoolkit.xml">package</uri>.
219</p>
220
221<pre caption="Locating package documentation">
222# <i>ls -l /usr/share/doc/alsa-lib-1.0.14_rc1</i>
223total 28
224-rw-r--r-- 1 root root 669 May 17 21:54 ChangeLog.gz
225-rw-r--r-- 1 root root 9373 May 17 21:54 COPYING.gz
226drwxr-xr-x 2 root root 8560 May 17 21:54 html
227-rw-r--r-- 1 root root 196 May 17 21:54 TODO.gz
228
229<comment>(Alternatively, use equery to locate interesting files:)</comment>
230# <i>equery files alsa-lib | less</i>
231media-libs/alsa-lib-1.0.14_rc1
232* Contents of media-libs/alsa-lib-1.0.14_rc1:
233/usr
234/usr/bin
235/usr/bin/alsalisp
236<comment>(Output truncated)</comment>
237</pre>
238
239</body>
240</subsection>
241<subsection>
183<title>Removing Software</title> 242<title>Removing Software</title>
184<body> 243<body>
185 244
186<p> 245<p>
187When you want to remove a software package from your system, use <c>emerge 246When you want to remove a software package from your system, use <c>emerge
220<p> 279<p>
221To keep your system in perfect shape (and not to mention install the latest 280To keep your system in perfect shape (and not to mention install the latest
222security updates) you need to update your system regularly. Since Portage only 281security updates) you need to update your system regularly. Since Portage only
223checks the ebuilds in your Portage tree you first have to update your Portage 282checks the ebuilds in your Portage tree you first have to update your Portage
224tree. When your Portage tree is updated, you can update your system with 283tree. When your Portage tree is updated, you can update your system with
225<c>emerge --update world</c>: 284<c>emerge --update world</c>. In the next example, we'll also use the
285<c>--ask</c> switch which will tell Portage to display the list of packages it
286wants to upgrade and ask you if you want to continue:
226</p> 287</p>
227 288
228<pre caption="Updating your system"> 289<pre caption="Updating your system">
229# <i>emerge --update world</i> 290# <i>emerge --update --ask world</i>
230</pre> 291</pre>
231 292
232<p> 293<p>
233Portage will then search for newer version of the applications you have 294Portage will then search for newer version of the applications you have
234installed. However, it will only verify the versions for the applications you 295installed. However, it will only verify the versions for the applications you
235have explicitly installed - not the dependencies. If you want to update every 296have <e>explicitly</e> installed (the applications listed in
236single package on your system, add the <c>--deep</c> argument: 297<path>/var/lib/portage/world</path>) - it does not thoroughly check their
298dependencies. If you want to update <e>every single package</e> on your system,
299add the <c>--deep</c> argument:
237</p> 300</p>
238 301
239<pre caption="Updating your entire system"> 302<pre caption="Updating your entire system">
240# <i>emerge --update --deep world</i> 303# <i>emerge --update --deep world</i>
241</pre> 304</pre>
305
306<p>
307Since security updates also happen in packages you have not explicitly installed
308on your system (but that are pulled in as dependencies of other programs), it
309is recommended to run this command once in a while.
310</p>
242 311
243<p> 312<p>
244If you have altered any of your <uri link="?part=2&amp;chap=2">USE flags</uri> 313If you have altered any of your <uri link="?part=2&amp;chap=2">USE flags</uri>
245lately you might want to add <c>--newuse</c> as well. Portage will then verify 314lately you might want to add <c>--newuse</c> as well. Portage will then verify
246if the change requires the installation of new packages or recompilation of 315if the change requires the installation of new packages or recompilation of
360<subsection id="blocked"> 429<subsection id="blocked">
361<title>Blocked Packages</title> 430<title>Blocked Packages</title>
362<body> 431<body>
363 432
364<pre caption="Portage warning about blocked packages (with --pretend)"> 433<pre caption="Portage warning about blocked packages (with --pretend)">
365[blocks B ] gnome-base/bonobo-activation (from pkg gnome-base/libbonobo-2.4.0) 434[blocks B ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1)
366</pre> 435</pre>
367 436
368<pre caption="Portage warning about blocked packages (without --pretend)"> 437<pre caption="Portage warning about blocked packages (without --pretend)">
369!!! Error: the gnome-base/bonobo-activation package conflicts with another package. 438!!! Error: the mail-mta/postfix package conflicts with another package.
370!!! both can't be installed on the same system together. 439!!! both can't be installed on the same system together.
371!!! Please use 'emerge --pretend' to determine blockers. 440!!! Please use 'emerge --pretend' to determine blockers.
372</pre> 441</pre>
373 442
374<p> 443<p>
380</p> 449</p>
381 450
382<p> 451<p>
383To fix a blockage, you can choose to not install the package or unmerge the 452To fix a blockage, you can choose to not install the package or unmerge the
384conflicting package first. In the given example, you can opt not to install 453conflicting package first. In the given example, you can opt not to install
385<c>libbonobo</c> or to remove <c>bonobo-activation</c> first. 454<c>postfix</c> or to remove <c>ssmtp</c> first.
455</p>
456
457<p>
458You may also see blocking packages with specific atoms, such as
459<b>&lt;</b>media-video/mplayer-bin-1.0_rc1-r2. In this case, updating to a more
460recent version of the blocking package would remove the block.
461</p>
462
463<p>
464It is also possible that two packages that are yet to be installed are blocking
465each other. In this rare case, you should find out why you need to install both.
466In most cases you can do with one of the packages alone. If not, please file a
467bug on <uri link="http://bugs.gentoo.org">Gentoo's bugtracking system</uri>.
386</p> 468</p>
387 469
388</body> 470</body>
389</subsection> 471</subsection>
390<subsection id="masked"> 472<subsection id="masked">
400 482
401- gnome-base/gnome-2.8.0_pre1 (masked by: <i>~x86 keyword</i>) 483- gnome-base/gnome-2.8.0_pre1 (masked by: <i>~x86 keyword</i>)
402- lm-sensors/lm-sensors-2.8.7 (masked by: <i>-sparc keyword</i>) 484- lm-sensors/lm-sensors-2.8.7 (masked by: <i>-sparc keyword</i>)
403- sys-libs/glibc-2.3.4.20040808 (masked by: <i>-* keyword</i>) 485- sys-libs/glibc-2.3.4.20040808 (masked by: <i>-* keyword</i>)
404- dev-util/cvsd-1.0.2 (masked by: <i>missing keyword</i>) 486- dev-util/cvsd-1.0.2 (masked by: <i>missing keyword</i>)
405- media-video/ati-gatos-4.3.0 (masked by: <i>package.mask</i>) 487- games-fps/unreal-tournament-451 (masked by: <i>package.mask</i>)
406- sys-libs/glibc-2.3.2-r11 (masked by: <i>profile</i>) 488- sys-libs/glibc-2.3.2-r11 (masked by: <i>profile</i>)
407</pre> 489</pre>
408 490
409<p> 491<p>
410When you want to install a package that isn't available for your system, you 492When you want to install a package that isn't available for your system, you
543from the system. 625from the system.
544</p> 626</p>
545 627
546</body> 628</body>
547</subsection> 629</subsection>
630<subsection id="digesterror">
631<title>Digest Verification Failures</title>
632<body>
633
634<p>
635Sometimes, when you attempt to emerge a package, it will fail with the message:
636</p>
637
638<pre caption="Digest verification failure">
639&gt;&gt;&gt; checking ebuild checksums
640!!! Digest verification failed:
641</pre>
642
643<p>
644This is a sign that something is wrong with the Portage tree -- often, it is
645because a developer may have made a mistake when committing a package to the
646tree.
647</p>
648
649<p>
650When the digest verification fails, do <e>not</e> try to re-digest the package
651yourself. Running <c>ebuild foo digest</c> will not fix the problem; it will
652almost certainly make it worse!
653</p>
654
655<p>
656Instead, wait an hour or two for the tree to settle down. It's likely that the
657error was noticed right away, but it can take a little time for the fix to
658trickle down the Portage tree. While you're waiting, check <uri
659link="http://bugs.gentoo.org">Bugzilla</uri> and see if anyone has reported
660the problem yet. If not, go ahead and file a bug for the broken package.
661</p>
662
663<p>
664Once you see that the bug has been fixed, you may want to re-sync to pick up
665the fixed digest.
666</p>
667
668<impo>
669This does <e>not</e> mean that you can re-sync your tree multiple times! As
670stated in the rsync policy (when you run <c>emerge --sync</c>), users who sync
671too often will be banned! In fact, it's better to just wait until your next
672scheduled sync, so that you don't overload the rsync servers.
673</impo>
674
675</body>
676</subsection>
548</section> 677</section>
549</sections> 678</sections>

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.67

  ViewVC Help
Powered by ViewVC 1.1.20