/[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.54 Revision 1.73
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.54 2005/06/11 12:16:14 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.73 2010/02/13 20:54:07 nightmorph 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.49</version> 16<version>1.66</version>
12<date>2005-06-11</date> 17<date>2010-02-13</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
191</p> 196</p>
192 197
193<pre caption="Checking the existence of a doc USE flag"> 198<pre caption="Checking the existence of a doc USE flag">
194<comment>(alsa-lib is just an example, of course.)</comment> 199<comment>(alsa-lib is just an example, of course.)</comment>
195# <i>emerge -vp alsa-lib</i> 200# <i>emerge -vp alsa-lib</i>
196[ebuild N ] media-libs/alsa-lib-1.0.9_rc3 +doc -jack 674 kB 201[ebuild N ] media-libs/alsa-lib-1.0.14_rc1 -debug +doc 698 kB
197</pre> 202</pre>
198 203
199<p> 204<p>
200You can enable or disable the <c>doc</c> USE flag either globally in the 205The best way of enabling the <c>doc</c> USE flag is doing it on a per-package
201<path>/etc/make.conf</path> file or per package in the 206basis via <path>/etc/portage/package.use</path>, so that you get documentation
202<path>/etc/portage/package.use</path> file. The <uri 207only for packages that you are interested in. Enabling this flag globally is
203link="?part=2&amp;chap=2">USE Flags</uri> chapter covers this aspect in detail. 208known to cause problems with circular dependencies. For more information, please
209read the <uri link="?part=2&amp;chap=2">USE Flags</uri> chapter.
204</p> 210</p>
205 211
206<p> 212<p>
207Once the package installed, its documentation is generally found in a 213Once the package installed, its documentation is generally found in a
208subdirectory named after the package under the <path>/usr/share/doc</path> 214subdirectory named after the package under the <path>/usr/share/doc</path>
210which is part of the <c>app-portage/gentoolkit</c> <uri 216which is part of the <c>app-portage/gentoolkit</c> <uri
211link="/doc/en/gentoolkit.xml">package</uri>. 217link="/doc/en/gentoolkit.xml">package</uri>.
212</p> 218</p>
213 219
214<pre caption="Locating package documentation"> 220<pre caption="Locating package documentation">
215# <i>ls -l /usr/share/doc/alsa-lib-1.0.9_rc3</i> 221# <i>ls -l /usr/share/doc/alsa-lib-1.0.14_rc1</i>
216total 28 222total 28
217-rw-r--r-- 1 root root 669 May 17 21:54 ChangeLog.gz 223-rw-r--r-- 1 root root 669 May 17 21:54 ChangeLog.gz
218-rw-r--r-- 1 root root 9373 May 17 21:54 COPYING.gz 224-rw-r--r-- 1 root root 9373 May 17 21:54 COPYING.gz
219drwxr-xr-x 2 root root 8560 May 17 21:54 html 225drwxr-xr-x 2 root root 8560 May 17 21:54 html
220-rw-r--r-- 1 root root 196 May 17 21:54 TODO.gz 226-rw-r--r-- 1 root root 196 May 17 21:54 TODO.gz
221 227
222<comment>(Alternatively, use equery to locate interesting files:)</comment> 228<comment>(Alternatively, use equery to locate interesting files:)</comment>
223# <i>equery files alsa-lib | less</i> 229# <i>equery files alsa-lib | less</i>
224media-libs/alsa-lib-1.0.9_rc3 230media-libs/alsa-lib-1.0.14_rc1
225* Contents of media-libs/alsa-lib-1.0.9_rc3: 231* Contents of media-libs/alsa-lib-1.0.14_rc1:
226/usr 232/usr
227/usr/bin 233/usr/bin
228/usr/bin/alsalisp 234/usr/bin/alsalisp
229<comment>(Output truncated)</comment> 235<comment>(Output truncated)</comment>
230</pre> 236</pre>
272<p> 278<p>
273To keep your system in perfect shape (and not to mention install the latest 279To keep your system in perfect shape (and not to mention install the latest
274security updates) you need to update your system regularly. Since Portage only 280security updates) you need to update your system regularly. Since Portage only
275checks the ebuilds in your Portage tree you first have to update your Portage 281checks the ebuilds in your Portage tree you first have to update your Portage
276tree. When your Portage tree is updated, you can update your system with 282tree. When your Portage tree is updated, you can update your system with
277<c>emerge --update world</c>: 283<c>emerge --update world</c>. In the next example, we'll also use the
284<c>--ask</c> switch which will tell Portage to display the list of packages it
285wants to upgrade and ask you if you want to continue:
278</p> 286</p>
279 287
280<pre caption="Updating your system"> 288<pre caption="Updating your system">
281# <i>emerge --update world</i> 289# <i>emerge --update --ask world</i>
282</pre> 290</pre>
283 291
284<p> 292<p>
285Portage will then search for newer version of the applications you have 293Portage will then search for newer version of the applications you have
286installed. However, it will only verify the versions for the applications you 294installed. However, it will only verify the versions for the applications you
287have explicitly installed - not the dependencies. If you want to update every 295have <e>explicitly</e> installed (the applications listed in
288single package on your system, add the <c>--deep</c> argument: 296<path>/var/lib/portage/world</path>) - it does not thoroughly check their
297dependencies. If you want to update <e>every single package</e> on your system,
298add the <c>--deep</c> argument:
289</p> 299</p>
290 300
291<pre caption="Updating your entire system"> 301<pre caption="Updating your entire system">
292# <i>emerge --update --deep world</i> 302# <i>emerge --update --deep world</i>
293</pre> 303</pre>
315<title>Metapackages</title> 325<title>Metapackages</title>
316<body> 326<body>
317 327
318<p> 328<p>
319Some packages in the Portage tree don't have any real content but are used to 329Some packages in the Portage tree don't have any real content but are used to
320install a collection of packages. For instance, the <c>kde</c> package will 330install a collection of packages. For instance, the <c>kde-meta</c> package will
321install a complete KDE environment on your system by pulling in various 331install a complete KDE environment on your system by pulling in various
322KDE-related packages as dependencies. 332KDE-related packages as dependencies.
323</p> 333</p>
324 334
325<p> 335<p>
418<subsection id="blocked"> 428<subsection id="blocked">
419<title>Blocked Packages</title> 429<title>Blocked Packages</title>
420<body> 430<body>
421 431
422<pre caption="Portage warning about blocked packages (with --pretend)"> 432<pre caption="Portage warning about blocked packages (with --pretend)">
423[blocks B ] gnome-base/bonobo-activation (from pkg gnome-base/libbonobo-2.4.0) 433[blocks B ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1)
424</pre> 434</pre>
425 435
426<pre caption="Portage warning about blocked packages (without --pretend)"> 436<pre caption="Portage warning about blocked packages (without --pretend)">
427!!! Error: the gnome-base/bonobo-activation package conflicts with another package. 437!!! Error: the mail-mta/postfix package conflicts with another package.
428!!! both can't be installed on the same system together. 438!!! both can't be installed on the same system together.
429!!! Please use 'emerge --pretend' to determine blockers. 439!!! Please use 'emerge --pretend' to determine blockers.
430</pre> 440</pre>
431 441
432<p> 442<p>
436these dependencies explicitly marks a package or virtual as being <e>not</e> 446these dependencies explicitly marks a package or virtual as being <e>not</e>
437compatible, it triggers a blockage. 447compatible, it triggers a blockage.
438</p> 448</p>
439 449
440<p> 450<p>
451While recent versions of Portage are smart enough to work around minor blockages
452without user intervention, occasionally you will need to fix it yourself, as
453explained below.
454</p>
455
456<p>
441To fix a blockage, you can choose to not install the package or unmerge the 457To fix a blockage, you can choose to not install the package or unmerge the
442conflicting package first. In the given example, you can opt not to install 458conflicting package first. In the given example, you can opt not to install
443<c>libbonobo</c> or to remove <c>bonobo-activation</c> first. 459<c>postfix</c> or to remove <c>ssmtp</c> first.
460</p>
461
462<p>
463You may also see blocking packages with specific atoms, such as
464<b>&lt;</b>media-video/mplayer-1.0_rc1-r2. In this case, updating to a more
465recent version of the blocking package would remove the block.
466</p>
467
468<p>
469It is also possible that two packages that are yet to be installed are blocking
470each other. In this rare case, you should find out why you need to install both.
471In most cases you can do with one of the packages alone. If not, please file a
472bug on <uri link="http://bugs.gentoo.org">Gentoo's bugtracking system</uri>.
444</p> 473</p>
445 474
446</body> 475</body>
447</subsection> 476</subsection>
448<subsection id="masked"> 477<subsection id="masked">
458 487
459- gnome-base/gnome-2.8.0_pre1 (masked by: <i>~x86 keyword</i>) 488- gnome-base/gnome-2.8.0_pre1 (masked by: <i>~x86 keyword</i>)
460- lm-sensors/lm-sensors-2.8.7 (masked by: <i>-sparc keyword</i>) 489- lm-sensors/lm-sensors-2.8.7 (masked by: <i>-sparc keyword</i>)
461- sys-libs/glibc-2.3.4.20040808 (masked by: <i>-* keyword</i>) 490- sys-libs/glibc-2.3.4.20040808 (masked by: <i>-* keyword</i>)
462- dev-util/cvsd-1.0.2 (masked by: <i>missing keyword</i>) 491- dev-util/cvsd-1.0.2 (masked by: <i>missing keyword</i>)
463- media-video/ati-gatos-4.3.0 (masked by: <i>package.mask</i>) 492- games-fps/unreal-tournament-451 (masked by: <i>package.mask</i>)
464- sys-libs/glibc-2.3.2-r11 (masked by: <i>profile</i>) 493- sys-libs/glibc-2.3.2-r11 (masked by: <i>profile</i>)
465</pre> 494</pre>
466 495
467<p> 496<p>
468When you want to install a package that isn't available for your system, you 497When you want to install a package that isn't available for your system, you
524<subsection id="ambiguousebuild"> 553<subsection id="ambiguousebuild">
525<title>Ambiguous Ebuild Name</title> 554<title>Ambiguous Ebuild Name</title>
526<body> 555<body>
527 556
528<pre caption="Portage warning about ambiguous ebuild names"> 557<pre caption="Portage warning about ambiguous ebuild names">
558[ Results for search key : listen ]
559[ Applications found : 2 ]
560
561* dev-tinyos/listen [ Masked ]
562 Latest version available: 1.1.15
563 Latest version installed: [ Not Installed ]
564 Size of files: 10,032 kB
565 Homepage: http://www.tinyos.net/
566 Description: Raw listen for TinyOS
567 License: BSD
568
569* media-sound/listen [ Masked ]
570 Latest version available: 0.6.3
571 Latest version installed: [ Not Installed ]
572 Size of files: 859 kB
573 Homepage: http://www.listen-project.org
574 Description: A Music player and management for GNOME
575 License: GPL-2
576
529!!! The short ebuild name "aterm" is ambiguous. Please specify 577!!! The short ebuild name "listen" is ambiguous. Please specify
530!!! one of the following fully-qualified ebuild names instead: 578!!! one of the above fully-qualified ebuild names instead.
531
532 dev-libs/aterm
533 x11-terms/aterm
534</pre> 579</pre>
535 580
536<p> 581<p>
537The application you want to install has a name that corresponds with more than 582The application you want to install has a name that corresponds with more than
538one package. You need to supply the category name as well. Portage will inform 583one package. You need to supply the category name as well. Portage will inform
601from the system. 646from the system.
602</p> 647</p>
603 648
604</body> 649</body>
605</subsection> 650</subsection>
651<subsection id="digesterror">
652<title>Digest Verification Failures</title>
653<body>
654
655<p>
656Sometimes, when you attempt to emerge a package, it will fail with the message:
657</p>
658
659<pre caption="Digest verification failure">
660&gt;&gt;&gt; checking ebuild checksums
661!!! Digest verification failed:
662</pre>
663
664<p>
665This is a sign that something is wrong with the Portage tree -- often, it is
666because a developer may have made a mistake when committing a package to the
667tree.
668</p>
669
670<p>
671When the digest verification fails, do <e>not</e> try to re-digest the package
672yourself. Running <c>ebuild foo manifest</c> will not fix the problem; it will
673almost certainly make it worse!
674</p>
675
676<p>
677Instead, wait an hour or two for the tree to settle down. It's likely that the
678error was noticed right away, but it can take a little time for the fix to
679trickle down the Portage tree. While you're waiting, check <uri
680link="http://bugs.gentoo.org">Bugzilla</uri> and see if anyone has reported
681the problem yet. If not, go ahead and file a bug for the broken package.
682</p>
683
684<p>
685Once you see that the bug has been fixed, you may want to re-sync to pick up
686the fixed digest.
687</p>
688
689<impo>
690This does <e>not</e> mean that you can re-sync your tree multiple times! As
691stated in the rsync policy (when you run <c>emerge --sync</c>), users who sync
692too often will be banned! In fact, it's better to just wait until your next
693scheduled sync, so that you don't overload the rsync servers.
694</impo>
695
696</body>
697</subsection>
606</section> 698</section>
607</sections> 699</sections>

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.73

  ViewVC Help
Powered by ViewVC 1.1.20