/[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.10 Revision 1.11
1<!-- The content of this document is licensed under the CC-BY-SA license --> 1<!-- The content of this document is licensed under the CC-BY-SA license -->
2<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 2<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
3 3
4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.10 2003/11/30 12:49:20 swift Exp $ --> 4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.11 2003/11/30 14:36:05 swift Exp $ -->
5 5
6<sections> 6<sections>
7<section> 7<section>
8<title>Obtaining Package Information</title> 8<title>Obtaining Package Information</title>
9<subsection> 9<subsection>
10<title>The Lord of All Tools: emerge</title> 10<title>The Lord of All Tools: emerge</title>
11<body> 11<body>
12 12
13<p> 13<p>
14The main Portage tool that most users will use is <c>emerge</c>. We have already 14The main Portage tool that most users will use is <c>emerge</c>. We have already
15used it during the Gentoo installation and in the previous chapter, but we just 15used it during the Gentoo installation and in the previous chapter, but we just
16briefly explained how to use it. This chapter will elaborate on <c>emerge</c> 16briefly explained how to use it. This chapter will elaborate on <c>emerge</c>
17and learn you how to use <c>emerge</c> to fix all your software-related needs. 17and learn you how to use <c>emerge</c> to fix all your software-related needs.
18</p> 18</p>
19 19
507</p> 507</p>
508 508
509<pre caption="Installing a specific gnumeric version"> 509<pre caption="Installing a specific gnumeric version">
510# <i>emerge --usepkg "&lt;gnumeric-1.2"</i> 510# <i>emerge --usepkg "&lt;gnumeric-1.2"</i>
511</pre> 511</pre>
512 512
513<p> 513<p>
514Other possibilities are of course "&gt;" (later version) and "=" (the exact 514Other possibilities are of course "&gt;" (later version) and "=" (the exact
515version). 515version).
516</p> 516</p>
517 517
518 518
519</body> 519</body>
520</subsection> 520</subsection>
521<subsection> 521<subsection>
522<title>Working with Dependencies</title>
523<body>
524
525<p>
526Portage has an extensive support for dependency handling. Although you usually
527don't need to even think about this (as dependencies are automatically handled
528by Portage) some users might want to know how you can work with <c>emerge</c>
529and dependencies.
530</p>
531
532<p>
533For instance, if you want Portage to pretend that none of the dependencies of a
534package are installed, you can use <c>--emptytree</c> (<c>-e</c> in short). This
535is useful with <c>--pretend</c> to display a complete tree of dependencies for
536any particular package. Without <c>--pretend</c>, <c>emerge</c> will (re)compile
537all listed packages. However, <c>glibc</c> will <e>not</e> be listed as
538dependency for safety reasons.
539</p>
540
541<pre caption="Show all dependencies of gnumeric">
542# <i>emerge --emptytree --pretend gnumeric</i>
543</pre>
544
545<p>
546Another argument is <c>--nodeps</c>, which will ask Portage to try install the
547given package without taking care of the dependencies. It is trivial that this
548can lead to failures.
549</p>
550
551<pre caption="Installing gnumeric without taking care of the dependencies">
552# <i>emerge --nodeps gnumeric</i>
553</pre>
554
555<p>
556To opposite of <c>--nodeps</c> is <c>--onlydeps</c>, which will have Portage
557install all dependencies of a given package, but not the package itself:
558</p>
559
560<pre caption="Installing the dependencies of gnumeric">
561# <i>emerge --onlydeps gnumeric</i>
562</pre>
563
564</body>
565</subsection>
566<subsection>
522<title>Updating your System</title> 567<title>Updating your System</title>
523<body> 568<body>
524 569
525<p> 570<p>
526Portage knows two special tags to denote a set of software packages: 571Portage knows two special tags to denote a set of software packages:
527<e>system</e> and <e>world</e>. You have already seen the former while 572<e>system</e> and <e>world</e>. You have already seen the former while
528installing Gentoo if you didn't use a <e>stage3</e> installation. To refresh 573installing Gentoo if you didn't use a <e>stage3</e> installation. To refresh
529things: <e>system</e> is the collection of <e>core</e> packages, necessary to 574things: <e>system</e> is the collection of <e>core</e> packages, necessary to
530have a working Gentoo system. 575have a working Gentoo system.
531</p> 576</p>
532 577
533<p> 578<p>
534The <e>world</e> tag consists of all software you have installed yourself on 579The <e>world</e> tag consists of all software you have installed yourself on
535your system plus the <e>system</e> information. In other words, every time you 580your system plus the <e>system</e> information. In other words, every time you
536emerge a package using <c>emerge &lt;package-name&gt;</c>, the 581emerge a package using <c>emerge &lt;package-name&gt;</c>, the
639<p> 684<p>
640If you want to test a removal (but not perform it), you can use <c>--pretend</c> 685If you want to test a removal (but not perform it), you can use <c>--pretend</c>
641again: 686again:
642</p> 687</p>
643 688
644<pre caption="Pretending to uninstall software"> 689<pre caption="Pretending to uninstall software">
645# <i>emerge --pretend unmerge gnumeric</i> 690# <i>emerge --pretend unmerge gnumeric</i>
646</pre> 691</pre>
647 692
648<warn> 693<warn>
649Portage doesn't verify if a package is a dependency for another 694Portage doesn't verify if a package is a dependency for another
650installed package. It also doesn't warn you if the package is part of 695installed package. It also doesn't warn you if the package is part of
651<e>system</e>, i.e. a core application necessary for the correct functioning of 696<e>system</e>, i.e. a core application necessary for the correct functioning of
652your system! 697your system!
653</warn> 698</warn>
699
700<p>
701Once the unmerge begins you will see a long list of filenames belonging to the
702package. Some of these filenames will have a flag displayed to the
703left of the filename. The flags <c>!mtime</c>, <c>!empty</c>, and <c>cfgpro</c>
704specify reasons why certain files are not being removed while the package is.
705Files listed without any of these three flags are removed from the
706filesystem successfully. The three flags specify the following reasons:
707</p>
708
709<ul>
710 <li>
711 <c>!mtime</c> : The listed file has been changed since it was installed,
712 probably by you or some tool
713 </li>
714 <li>
715 <c>!empty</c> : The listed directory is not empty
716 </li>
717 <li>
718 <c>cfgpro</c> : Another already installed package claims to own this file
719 </li>
720</ul>
654 721
655</body> 722</body>
656</subsection> 723</subsection>
657</section> 724</section>
658<section> 725<section>
659<title>Software Availability</title> 726<title>Software Availability</title>
660<subsection> 727<subsection>
661<title>ARCH or not?</title> 728<title>ARCH or not?</title>
662<body> 729<body>
663 730
664<p> 731<p>
665Gentoo places its packages in two possible stadia called <e>ARCH</e> and 732Gentoo places its packages in two possible stadia called <e>ARCH</e> and
666<e>~ARCH</e>. Don't take this literally: the stadia depend on the architecture 733<e>~ARCH</e>. Don't take this literally: the stadia depend on the architecture
667you are using. In other words, for x86-based systems you have <e>x86</e> and 734you are using. In other words, for x86-based systems you have <e>x86</e> and
668<e>~x86</e>, for ppc-based systems you have <e>ppc</e> and <e>~ppc</e> etc. 735<e>~x86</e>, for ppc-based systems you have <e>ppc</e> and <e>~ppc</e> etc.

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20