/[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.3 Revision 1.4
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.3 2003/11/26 20:19:59 swift Exp $ --> 4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.4 2003/11/27 11:08:00 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>
14We have briefly encountered <c>emerge</c> in the previous chapter, but not to 14We have briefly encountered <c>emerge</c> in the previous chapter, but not to
15the extent that you are now able to work with it to its fullest potential. We 15the extent that you are now able to work with it to its fullest potential. We
16will fix that right now ;-) 16will fix that right now ;-)
17</p> 17</p>
18 18
19<p> 19<p>
211 Latest version available: 3.8 211 Latest version available: 3.8
212 Latest version installed: 3.8 212 Latest version installed: 3.8
213 Size of downloaded files: 2,782 kB 213 Size of downloaded files: 2,782 kB
214 Homepage: http://www.mozilla.org/projects/security/pki/nss/ 214 Homepage: http://www.mozilla.org/projects/security/pki/nss/
215 Description: Mozilla's Netscape Security Services Library that implements PKI support 215 Description: Mozilla's Netscape Security Services Library that implements PKI support
216</pre> 216</pre>
217 217
218<p> 218<p>
219As you can see, the output of <c>emerge</c> informs you about the category and 219As you can see, the output of <c>emerge</c> informs you about the category and
220name of the package, the available version, the currently installed version, 220name of the package, the available version, the currently installed version,
221the size of the downloaded files, the homepage and the small description. 221the size of the downloaded files, the homepage and the small description.
222</p> 222</p>
223 223
224<p> 224<p>
225You see something new? Yes, <e>downloaded files</e>. When you tell Portage to 225You see something new? Yes, <e>downloaded files</e>. When you tell Portage to
226install a package, it ofcourse needs to have the necessary sources (or 226install a package, it of course needs to have the necessary sources (or
227precompiled packages) available. It therefor checks the contents of 227precompiled packages) available. It therefor checks the contents of
228<path>/usr/portage/distfiles</path> (for sourcecode) or 228<path>/usr/portage/distfiles</path> (for sourcecode) or
229<path>/usr/portage/packages/All</path> (for precompiled packages) to see if the 229<path>/usr/portage/packages/All</path> (for precompiled packages) to see if the
230necessary files are already available. If not, it downloads the necessary files 230necessary files are already available. If not, it downloads the necessary files
231and places them in those directories. 231and places them in those directories.
232</p> 232</p>
233 233
234<note> 234<note>
235Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very 235Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very
236time consuming. There are other, more performant tools available. We will 236time consuming. There are other, more performant tools available. We will
237describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and 237describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and
238Other Tools</uri>. 238Other Tools</uri>.
239</note> 239</note>
240 240
241</body> 241</body>
341<body> 341<body>
342 342
343<p> 343<p>
344Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to 344Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to
345install such an ebuild, you can choose between <e>building</e> the package, or 345install such an ebuild, you can choose between <e>building</e> the package, or
346using a <e>prebuild</e> package. But what are the advantages/disadvantages of 346using a <e>prebuild</e> package. But what are the advantages/disadvantages of
347both approaches, and can they be used next to each other? 347both approaches, and can they be used next to each other?
348</p> 348</p>
349 349
350<p> 350<p>
351As you probably have guessed, building packages takes a lot of time (especially 351As you probably have guessed, building packages takes a lot of time (especially
352if you have little resources or want to build big packages, such as <uri 352if you have little resources or want to build big packages, such as <uri
353link="http://www.kde.org">KDE</uri>, <uri 353link="http://www.kde.org">KDE</uri>, <uri
354link="http://www.openoffice.org">OpenOffice.org</uri>, etc.). By building the 354link="http://www.openoffice.org">OpenOffice.org</uri>, etc.). By building the
355package, you can use the <c>USE</c> setting to tweak the package to your system. 355package, you can use the <c>USE</c> setting to tweak the package to your system.
356Ofcourse, you can also define high optimization options (in the <c>CFLAGS</c> 356Of course, you can also define high optimization options (in the <c>CFLAGS</c>
357and <c>CXXFLAGS</c> variables) to compile the package with. 357and <c>CXXFLAGS</c> variables) to compile the package with.
358</p> 358</p>
359 359
360<p> 360<p>
361Using prebuild packages improves the installation time (as no more compilation 361Using prebuild packages improves the installation time (as no more compilation
362is needed), but you will lose the advantages of the <c>USE</c> setting and the 362is needed), but you will lose the advantages of the <c>USE</c> setting and the
363<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables. 363<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables.
364</p> 364</p>
365 365
366<p> 366<p>
367As previously stated, prebuild packages are stored in the 367As previously stated, prebuild packages are stored in the
368<path>/usr/portage/packages/All</path> directory, while the sourcecode of the 368<path>/usr/portage/packages/All</path> directory, while the sourcecode of the
369packages are placed in <path>/usr/portage/distfiles</path>. If you have finished 369packages are placed in <path>/usr/portage/distfiles</path>. If you have finished
370installing a package you can remove the package or sourcecode from the 370installing a package you can remove the package or sourcecode from the
371respective directory. However, you might want to keep the package/sourcecode of 371respective directory. However, you might want to keep the package/sourcecode of
420<pre caption="Showing URLs of the sources for gnumeric"> 420<pre caption="Showing URLs of the sources for gnumeric">
421# <i>emerge --fetchonly --pretend gnumeric</i> 421# <i>emerge --fetchonly --pretend gnumeric</i>
422</pre> 422</pre>
423 423
424<p> 424<p>
425You can also opt to install a specific version of a package. 425You can also opt to install a specific version of a package.
426For instance, if you want to install a gnumeric version older than 1.2 -- for 426For instance, if you want to install a gnumeric version older than 1.2 -- for
427any reason whatsoever :) you would type: 427any reason whatsoever :) you would type:
428</p> 428</p>
429 429
430<pre caption="Installing a specific gnumeric version"> 430<pre caption="Installing a specific gnumeric version">
431# <i>emerge "&lt;gnumeric-1.2"</i> 431# <i>emerge "&lt;gnumeric-1.2"</i>
432</pre> 432</pre>
433 433
434<p> 434<p>
435Other possibilities are ofcourse "&gt;" (later version) and "=" (the exact 435Other possibilities are of course "&gt;" (later version) and "=" (the exact
436version). 436version).
437</p> 437</p>
438 438
439</body> 439</body>
440</subsection> 440</subsection>
441<subsection> 441<subsection>
442<title>Installing Prebuild Packages</title> 442<title>Installing Prebuild Packages</title>
443<body> 443<body>
444 444
445<p> 445<p>
446When you want to install a prebuild package, you should use the <c>--usepkg</c> 446When you want to install a prebuild package, you should use the <c>--usepkg</c>
447option (<c>-k</c> in short). This will use the binary package available in 447option (<c>-k</c> in short). This will use the binary package available in
448<path>/usr/portage/packages/All</path> <e>if</e> the package and the version of 448<path>/usr/portage/packages/All</path> <e>if</e> the package and the version of
449the application you want to install match. 449the application you want to install match.
450</p> 450</p>
502</pre> 502</pre>
503 503
504<!-- TODO Up until here --> 504<!-- TODO Up until here -->
505 505
506<p> 506<p>
507You can also opt to install a specific version of a package. 507You can also opt to install a specific version of a package.
508For instance, if you want to install a gnumeric version older than 1.2 -- for 508For instance, if you want to install a gnumeric version older than 1.2 -- for
509any reason whatsoever :) you would type: 509any reason whatsoever :) you would type:
510</p> 510</p>
511 511
512<pre caption="Installing a specific gnumeric version"> 512<pre caption="Installing a specific gnumeric version">
513# <i>emerge --usepkg "&lt;gnumeric-1.2"</i> 513# <i>emerge --usepkg "&lt;gnumeric-1.2"</i>
514</pre> 514</pre>
515 515
516<p> 516<p>
517Other possibilities are ofcourse "&gt;" (later version) and "=" (the exact 517Other possibilities are of course "&gt;" (later version) and "=" (the exact
518version). 518version).
519</p> 519</p>
520 520
521 521
522</body> 522</body>
523</subsection> 523</subsection>
524<subsection> 524<subsection>
525<title>Updating your System</title> 525<title>Updating your System</title>
526<body> 526<body>
527 527
528<p> 528<p>
529Portage knows two special tags to denote a set of software packages: 529Portage knows two special tags to denote a set of software packages:
530<e>system</e> and <e>world</e>. You have already seen the former while 530<e>system</e> and <e>world</e>. You have already seen the former while
531installing Gentoo if you didn't use a <e>stage3</e> installation. To refresh 531installing Gentoo if you didn't use a <e>stage3</e> installation. To refresh
532things: <e>system</e> is the collection of <e>core</e> packages, necessary to 532things: <e>system</e> is the collection of <e>core</e> packages, necessary to
608 removed. 608 removed.
609 </li> 609 </li>
610</ul> 610</ul>
611 611
612<p> 612<p>
613In certain cases, an update may mean a downgrade (i.e. install an older version 613In certain cases, an update may mean a downgrade (i.e. install an older version
614instead of a newer version). If you don't want this to happen, use the 614instead of a newer version). If you don't want this to happen, use the
615<c>--upgradeonly</c> option (<c>-U</c> in short): 615<c>--upgradeonly</c> option (<c>-U</c> in short):
616</p> 616</p>
617 617
618<pre caption="Upgrading your entire system"> 618<pre caption="Upgrading your entire system">
619# <i>emerge --update --upgradeonly world</i> 619# <i>emerge --update --upgradeonly world</i>
620</pre> 620</pre>
621 621
622<p> 622<p>
623Ofcourse, we are talking here about <e>system</e> and <e>world</e>, but you can 623Of course, we are talking here about <e>system</e> and <e>world</e>, but you can
624perform the same actions for individual software packages. 624perform the same actions for individual software packages.
625</p> 625</p>
626 626
627</body> 627</body>
628</subsection> 628</subsection>
629<subsection> 629<subsection>
630<title>Removing Software</title> 630<title>Removing Software</title>
631<body> 631<body>
632 632
633<p> 633<p>
634If you want to remove software from your system, you can use the <c>unmerge</c> 634If you want to remove software from your system, you can use the <c>unmerge</c>
635option (<c>-C</c> - capital C - in short): 635option (<c>-C</c> - capital C - in short):
636</p> 636</p>
637 637
638<pre caption="Uninstalling software"> 638<pre caption="Uninstalling software">

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20