/[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.7 Revision 1.8
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.7 2003/11/29 12:06:49 bennyc Exp $ --> 4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.8 2003/11/30 10:58:01 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
326<c>emerge-webrsync</c> which will download a Portage Tree snapshot using 326<c>emerge-webrsync</c> which will download a Portage Tree snapshot using
327<c>wget</c>. This also means that you can use proxies if you want. We discussed 327<c>wget</c>. This also means that you can use proxies if you want. We discussed
328how to setup your system to use proxies during the Gentoo installation. 328how to setup your system to use proxies during the Gentoo installation.
329</p> 329</p>
330 330
331<pre caption="Updating Portage using emerge-webrsync"> 331<pre caption="Updating Portage using emerge-webrsync">
332# <i>emerge-webrsync</i> 332# <i>emerge-webrsync</i>
333</pre> 333</pre>
334 334
335</body> 335</body>
336</subsection> 336</subsection>
337</section> 337</section>
338<section> 338<section>
339<title>Maintaining Software</title> 339<title>Maintaining Software</title>
340<subsection> 340<subsection>
341<title>Building or Prebuild?</title> 341<title>Building or Prebuilt?</title>
342<body> 342<body>
343 343
344<p> 344<p>
345Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to 345Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to
346install such an ebuild, you can choose between <e>building</e> the package, or 346install such an ebuild, you can choose between <e>building</e> the package, or
347using a <e>prebuild</e> package. But what are the advantages/disadvantages of 347using a <e>prebuilt</e> package. But what are the advantages/disadvantages of
348both approaches, and can they be used next to each other? 348both approaches, and can they be used next to each other?
349</p> 349</p>
350 350
351<p> 351<p>
352As you probably have guessed, building packages takes a lot of time (especially 352As you probably have guessed, building packages takes a lot of time (especially
353if you have little resources or want to build big packages, such as <uri 353if you have little resources or want to build big packages, such as <uri
354link="http://www.kde.org">KDE</uri>, <uri 354link="http://www.kde.org">KDE</uri>, <uri
355link="http://www.openoffice.org">OpenOffice.org</uri>, etc.). By building the 355link="http://www.openoffice.org">OpenOffice.org</uri>, etc.). By building the
356package, you can use the <c>USE</c> setting to tweak the package to your system. 356package, you can use the <c>USE</c> setting to tweak the package to your system.
357Of course, you can also define high optimization options (in the <c>CFLAGS</c> 357Of course, you can also define high optimization options (in the <c>CFLAGS</c>
358and <c>CXXFLAGS</c> variables) to compile the package with. 358and <c>CXXFLAGS</c> variables) to compile the package with.
359</p> 359</p>
360 360
361<p> 361<p>
362Using prebuild packages improves the installation time (as no more compilation 362Using prebuilt packages improves the installation time (as no more compilation
363is needed), but you will lose the advantages of the <c>USE</c> setting and the 363is needed), but you will lose the advantages of the <c>USE</c> setting and the
364<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables. 364<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables.
365</p> 365</p>
366 366
367<p> 367<p>
368As previously stated, prebuild packages are stored in the 368As previously stated, prebuilt packages are stored in the
369<path>/usr/portage/packages/All</path> directory, while the sourcecode of the 369<path>/usr/portage/packages/All</path> directory, while the sourcecode of the
370packages are placed in <path>/usr/portage/distfiles</path>. If you have finished 370packages are placed in <path>/usr/portage/distfiles</path>. If you have finished
371installing a package you can remove the package or sourcecode from the 371installing a package you can remove the package or sourcecode from the
372respective directory. However, you might want to keep the package/sourcecode of 372respective directory. However, you might want to keep the package/sourcecode of
373the latest version, just in case you want to reinstall the package (so you don't 373the latest version, just in case you want to reinstall the package (so you don't
374have to redownload it). 374have to redownload it).
375</p> 375</p>
376 376
377</body> 377</body>
378</subsection> 378</subsection>
379<subsection> 379<subsection>
380<title>Installing Software from Sources</title> 380<title>Installing Software from Sources</title>
381<body> 381<body>
382 382
383<p> 383<p>
384Okay, enough talking, let's cut to the chase. To install a package, you will use 384Okay, enough talking, let's cut to the chase. To install a package, you will use
385the <c>emerge</c> command. If you don't want to use any prebuild packages, you 385the <c>emerge</c> command. If you don't want to use any prebuilt packages, you
386can just use <c>emerge &lt;package-name&gt;</c> or <c>emerge 386can just use <c>emerge &lt;package-name&gt;</c> or <c>emerge
387&lt;category&gt;/&lt;package-name&gt;</c>. As an example we'll install 387&lt;category&gt;/&lt;package-name&gt;</c>. As an example we'll install
388<c>gnumeric</c>: 388<c>gnumeric</c>:
389</p> 389</p>
390 390
391<pre caption="Building gnumeric"> 391<pre caption="Building gnumeric">
392# <i>emerge gnumeric</i> 392# <i>emerge gnumeric</i>
393</pre> 393</pre>
394 394
395<p> 395<p>
396This will download the sourcecode for you and unpacks, compiles and installs the 396This will download the sourcecode for you and unpacks, compiles and installs the
397package on your system. It will also do the same for all the dependencies. If 397package on your system. It will also do the same for all the dependencies. If
398you want to see what dependencies will be installed with it, use the 398you want to see what dependencies will be installed with it, use the
399<c>--pretend</c> option (<c>-p</c> in short): 399<c>--pretend</c> option (<c>-p</c> in short):
400</p> 400</p>
428any reason whatsoever :) you would type: 428any reason whatsoever :) you would type:
429</p> 429</p>
430 430
431<pre caption="Installing a specific gnumeric version"> 431<pre caption="Installing a specific gnumeric version">
432# <i>emerge "&lt;gnumeric-1.2"</i> 432# <i>emerge "&lt;gnumeric-1.2"</i>
433</pre> 433</pre>
434 434
435<p> 435<p>
436Other possibilities are of course "&gt;" (later version) and "=" (the exact 436Other possibilities are of course "&gt;" (later version) and "=" (the exact
437version). 437version).
438</p> 438</p>
439 439
440</body> 440</body>
441</subsection> 441</subsection>
442<subsection> 442<subsection>
443<title>Installing Prebuild Packages</title> 443<title>Installing Prebuilt Packages</title>
444<body> 444<body>
445 445
446<p> 446<p>
447When you want to install a prebuild package, you should use the <c>--usepkg</c> 447When you want to install a prebuilt package, you should use the <c>--usepkg</c>
448option (<c>-k</c> in short). This will use the binary package available in 448option (<c>-k</c> in short). This will use the binary package available in
449<path>/usr/portage/packages/All</path> <e>if</e> the package and the version of 449<path>/usr/portage/packages/All</path> <e>if</e> the package and the version of
450the application you want to install match. 450the application you want to install match.
451</p> 451</p>
452 452
453<pre caption="Installing a prebuild package for gnumeric"> 453<pre caption="Installing a prebuilt package for gnumeric">
454# <i>emerge --usepkg gnumeric</i> 454# <i>emerge --usepkg gnumeric</i>
455</pre> 455</pre>
456 456
457<p> 457<p>
458If you want to use the binary package, even if the versions don't match, use 458If you want to use the binary package, even if the versions don't match, use
459<c>--usepkgonly</c> (<c>-K</c> in short). 459<c>--usepkgonly</c> (<c>-K</c> in short).
460</p> 460</p>
461 461
462<pre caption="Installing the prebuild package for gnumeric"> 462<pre caption="Installing the prebuilt package for gnumeric">
463# <i>emerge --usepkgonly gnumeric</i> 463# <i>emerge --usepkgonly gnumeric</i>
464</pre> 464</pre>
465 465
466<!-- TODO When handbook goes life, comment out this parts until the mirrors have 466<!-- TODO When handbook goes life, comment out this parts until the mirrors have
467 been updated with online GRP packages. --> 467 been updated with online GRP packages. -->
468<p> 468<p>
469If you don't have the prebuild package on your system yet, you can have 469If you don't have the prebuilt package on your system yet, you can have
470<c>emerge</c> download it from a mirror, defined in the <c>PORTAGE_BINHOST</c> 470<c>emerge</c> download it from a mirror, defined in the <c>PORTAGE_BINHOST</c>
471variable declared in <path>/etc/make.conf</path>. 471variable declared in <path>/etc/make.conf</path>.
472</p> 472</p>
473 473
474<p> 474<p>
475To download the binary package in case this package doesn't exist on 475To download the binary package in case this package doesn't exist on
476your system already, use <c>--getbinpkg</c> (<c>-g</c> in short): 476your system already, use <c>--getbinpkg</c> (<c>-g</c> in short):
477</p> 477</p>
478 478
479<pre caption="Downloading and installing a prebuild package for gnumeric"> 479<pre caption="Downloading and installing a prebuilt package for gnumeric">
480# <i>emerge --getbinpkg gnumeric</i> 480# <i>emerge --getbinpkg gnumeric</i>
481</pre> 481</pre>
482 482
483<p> 483<p>
484This will download the package and the package-related information for you and 484This will download the package and the package-related information for you and
485install it on your system, together with the dependencies. If you want to see 485install it on your system, together with the dependencies. If you want to see
486what dependencies will be installed with it, use the <c>--pretend</c> option 486what dependencies will be installed with it, use the <c>--pretend</c> option
487(<c>-p</c> in short): 487(<c>-p</c> in short):
488</p> 488</p>
489 489
490<pre caption="Pretending to download the prebuild packages for gnumeric"> 490<pre caption="Pretending to download the prebuilt packages for gnumeric">
491# <i>emerge --getbinpkg --pretend gnumeric</i> 491# <i>emerge --getbinpkg --pretend gnumeric</i>
492</pre> 492</pre>
493 493
494<p> 494<p>
495You can also opt to download the prebuild package (and the package-related 495You can also opt to download the prebuilt package (and the package-related
496information) <e>without</e> checking the information on your local system and 496information) <e>without</e> checking the information on your local system and
497<e>without</e> using the prebuild package already on your system (if 497<e>without</e> using the prebuilt package already on your system (if
498applicable), use the <c>--getbinpkgonly</c> option (<c>-G</c> in short): 498applicable), use the <c>--getbinpkgonly</c> option (<c>-G</c> in short):
499</p> 499</p>
500 500
501<pre caption="Installing a prebuild package without using local information"> 501<pre caption="Installing a prebuilt package without using local information">
502# <i>emerge --getbinpkgonly gnumeric</i> 502# <i>emerge --getbinpkgonly gnumeric</i>
503</pre> 503</pre>
504 504
505<!-- TODO Up until here --> 505<!-- TODO Up until here -->
506 506
507<p> 507<p>
508You can also opt to install a specific version of a package. 508You can also opt to install a specific version of a package.
509For instance, if you want to install a gnumeric version older than 1.2 -- for 509For instance, if you want to install a gnumeric version older than 1.2 -- for
510any reason whatsoever :) you would type: 510any reason whatsoever :) you would type:
511</p> 511</p>
512 512
513<pre caption="Installing a specific gnumeric version"> 513<pre caption="Installing a specific gnumeric version">
514# <i>emerge --usepkg "&lt;gnumeric-1.2"</i> 514# <i>emerge --usepkg "&lt;gnumeric-1.2"</i>
515</pre> 515</pre>
516 516

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20