/[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.6 Revision 1.31
1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
1<!-- 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 -->
2<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
3 6
4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.6 2003/11/27 14:45:38 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.31 2004/08/04 07:01:58 swift Exp $ -->
5 8
6<sections> 9<sections>
7<section> 10<section>
8<title>Obtaining Package Information</title> 11<title>Obtaining Package Information</title>
9<subsection> 12<subsection>
12 15
13<p> 16<p>
14The main Portage tool that most users will use is <c>emerge</c>. We have already 17The 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 18used 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> 19briefly 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. 20and teach you how to use <c>emerge</c> to fix all your software-related needs.
18</p> 21</p>
19 22
20<p> 23<p>
21<c>emerge</c> is the command used to install, remove, query and maintain 24<c>emerge</c> is the command used to install, remove, query and maintain
22software packages. It is a front-end for <c>ebuild</c>; people interested in 25software packages. It is a front-end for <c>ebuild</c>; people interested in
103gnofin/ khacc/ mrproject/ phprojekt/ texmacs/ 106gnofin/ khacc/ mrproject/ phprojekt/ texmacs/
104</pre> 107</pre>
105 108
106<p> 109<p>
107Inside a category you will find the packages belonging to that category, with a 110Inside a category you will find the packages belonging to that category, with a
108seperate directory for each package. Let us take a look at the <c>openoffice</c> 111separate directory for each package. Let us take a look at the <c>openoffice</c>
109package: 112package:
110</p> 113</p>
111 114
112<pre caption="Viewing a package"> 115<pre caption="Viewing a package">
113# <i>cd openoffice; ls --classify</i> 116# <i>cd openoffice; ls --classify</i>
115Manifest metadata.xml openoffice-1.1.0-r1.ebuild openoffice-1.1.0.ebuild 118Manifest metadata.xml openoffice-1.1.0-r1.ebuild openoffice-1.1.0.ebuild
116</pre> 119</pre>
117 120
118<p> 121<p>
119Remember that we told you that a Gentoo package is called an ebuild? Well, in 122Remember that we told you that a Gentoo package is called an ebuild? Well, in
120the example directory four of such ebuilds are stored. Their naming is 123the example directory, four of such ebuilds are stored. Their naming is
121almost identical: they only differ in the version name. 124almost identical; they only differ in the version name.
122You are free to view the contents of such a package: they are plain scripts. We 125You are free to view the contents of such a package: they are plain scripts. We
123will not discuss it right now as it isn't important to know if you plan on just 126will not discuss it right now as it isn't important to know if you plan on just
124using Gentoo. 127using Gentoo.
125</p> 128</p>
126 129
127<p> 130<p>
128The other files are the <path>ChangeLog</path> (which contains a listing of all 131The other files are the <path>ChangeLog</path> (which contains a listing of all
129the changes done to the ebuilds), <path>Manifest</path> (which contains the 132the changes done to the ebuilds), <path>Manifest</path> (which contains the
130checksums and permissions of all the files in the directory) and 133checksums and filesizes of all the files in the directory) and
131<path>metadata.xml</path> (which contains more information about the package, 134<path>metadata.xml</path> (which contains more information about the package,
132such as the responsible development group -- called <e>herd</e> -- and a more 135such as the responsible development group -- called <e>herd</e> -- and a more
133extensive description). 136extensive description).
134</p> 137</p>
135 138
136<p> 139<p>
137Inside the <path>files</path> directory you will find extra files, needed by 140Inside the <path>files</path> directory, you will find extra files, needed by
138Portage: digests (checksums and permissions of the files needed by a single 141Portage: digests (checksums and permissions of the files needed by a single
139version of the package), patches, example configuration files, etc. 142version of the package), patches, example configuration files, etc.
140</p> 143</p>
141 144
142<pre caption="Viewing the extra files"> 145<pre caption="Viewing the extra files">
150nptl.patch 153nptl.patch
151</pre> 154</pre>
152 155
153<p> 156<p>
154If you go back to the root of the Portage tree (<path>/usr/portage</path>) you 157If you go back to the root of the Portage tree (<path>/usr/portage</path>) you
155will notice that there are other, non-category directories too. We will discuss 158will notice that there are other, non-category directories, too. We will discuss
156those later in this chapter. 159those later in this chapter.
157</p> 160</p>
158 161
159</body> 162</body>
160</subsection> 163</subsection>
224 227
225<p> 228<p>
226You see something new? Yes, <e>downloaded files</e>. When you tell Portage to 229You see something new? Yes, <e>downloaded files</e>. When you tell Portage to
227install a package, it of course needs to have the necessary sources (or 230install a package, it of course needs to have the necessary sources (or
228precompiled packages) available. It therefore checks the contents of 231precompiled packages) available. It therefore checks the contents of
229<path>/usr/portage/distfiles</path> (for sourcecode) or 232<path>/usr/portage/distfiles</path> (for source code) or
230<path>/usr/portage/packages/All</path> (for precompiled packages) to see if the 233<path>/usr/portage/packages/All</path> (for precompiled packages) to see if the
231necessary files are already available. If not, it downloads the necessary files 234necessary files are already available. If not, it downloads the necessary files
232and places them in those directories. 235and places them in those directories.
233</p> 236</p>
234 237
238<!--
235<note> 239<note>
236Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very 240Searching the Portage Tree, especially when using <c>- -searchdesc</c>, is very
237time consuming. There are other, more performant tools available. We will 241time consuming. There are other, best performing tools available. We will
238describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and 242describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and
239Other Tools</uri>. 243Other Tools</uri>.
240</note> 244</note>
245-->
241 246
242</body> 247</body>
243</subsection> 248</subsection>
244<subsection> 249<subsection>
245<title>Viewing the ChangeLog</title> 250<title>Viewing the ChangeLog</title>
246<body> 251<body>
247 252
248<p> 253<p>
249While browsing through the Portage Tree, you saw that there was a ChangeLog for 254While browsing through the Portage Tree, you saw that there was a ChangeLog for
250each package. You can view this ChangeLog with <c>emerge</c> too. Use the 255each package. You can view the ChangeLog entries between the available version
256and the installed version with <c>emerge</c> too. Use the
251<c>--pretend --changelog</c> (<c>-pl</c> in short) options. As an example we 257<c>--pretend --changelog</c> (<c>-pl</c> in short) options. As an example we
252will view the ChangeLog entries for <c>gnumeric</c>: 258will view the ChangeLog entries for <c>gnumeric</c>:
253</p> 259</p>
254 260
255<pre caption="Viewing the ChangeLog entries for gnumeric"> 261<pre caption="Viewing the ChangeLog entries for gnumeric">
256# <i>emerge --pretend --changelog gnumeric</i> 262# <i>emerge --pretend --changelog gnumeric</i>
263<comment>(Some output removed to improve readability)</comment>
264*gnumeric-1.2.2
265
266 27 Nov 2003; foser &lt;foser@gentoo.org&gt; gnumeric-1.2.2.ebuild :
267 New release, requested in #34492
268 updated deps
269
270 12 Nov 2003; Jason Wever &lt;weeve@gentoo.org&gt; gnumeric-1.2.0.ebuild:
271 Marked stable on sparc, fixes bug #32405.
272
273 14 Oct 2003; Jason Wever &lt;weeve@gentoo.org&gt; gnumeric-1.0.8.ebuild:
274 Added ~sparc keyword. Fixes bug #31150.
257</pre> 275</pre>
258 276
259</body> 277</body>
260</subsection> 278</subsection>
261</section> 279</section>
298# <i>emerge --usepkg mirrorselect</i> 316# <i>emerge --usepkg mirrorselect</i>
299</pre> 317</pre>
300 318
301<p> 319<p>
302Now run <c>mirrorselect</c> to automatically select mirrors for you (it will 320Now run <c>mirrorselect</c> to automatically select mirrors for you (it will
303also setup Portage to use a mirror for the sourcecode): 321also setup Portage to use a mirror for the source code):
304</p> 322</p>
305 323
306<pre caption="Running mirrorselect"> 324<pre caption="Running mirrorselect">
307# <i>mirrorselect -a -s3</i> 325# <i>mirrorselect -a -s3</i>
308</pre> 326</pre>
336</subsection> 354</subsection>
337</section> 355</section>
338<section> 356<section>
339<title>Maintaining Software</title> 357<title>Maintaining Software</title>
340<subsection> 358<subsection>
341<title>Building or Prebuild?</title> 359<title>Building or Prebuilt?</title>
342<body> 360<body>
343 361
344<p> 362<p>
345Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to 363Gentoo 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 364install such an ebuild, you can choose between <e>building</e> the package and
347using a <e>prebuild</e> package. But what are the advantages/disadvantages of 365using a <e>prebuilt</e> package. But what are the advantages/disadvantages of
348both approaches, and can they be used next to each other? 366both approaches, and can they be used next to each other?
349</p> 367</p>
350 368
351<p> 369<p>
352As you probably have guessed, building packages takes a lot of time (especially 370As you probably have guessed, building packages takes a lot of time (especially
357Of course, you can also define high optimization options (in the <c>CFLAGS</c> 375Of course, you can also define high optimization options (in the <c>CFLAGS</c>
358and <c>CXXFLAGS</c> variables) to compile the package with. 376and <c>CXXFLAGS</c> variables) to compile the package with.
359</p> 377</p>
360 378
361<p> 379<p>
362Using prebuild packages improves the installation time (as no more compilation 380Using 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 381is needed), but you will lose the advantages of the <c>USE</c> setting and the
364<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables. 382<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables.
365</p> 383</p>
366 384
367<p> 385<p>
368As previously stated, prebuild packages are stored in the 386As previously stated, prebuilt packages are stored in the
369<path>/usr/portage/packages/All</path> directory, while the sourcecode of the 387<path>/usr/portage/packages/All</path> directory, while the source code of the
370packages are placed in <path>/usr/portage/distfiles</path>. If you have finished 388packages is placed in <path>/usr/portage/distfiles</path>. If you have finished
371installing a package you can remove the package or sourcecode from the 389installing a package you can remove the package or source code from the
372respective directory. However, you might want to keep the package/sourcecode of 390respective directory. However, you might want to keep the package/source code of
373the latest version, just in case you want to reinstall the package (so you don't 391the latest version, just in case you want to reinstall the package (so you don't
374have to redownload it). 392have to redownload it).
375</p> 393</p>
376 394
377</body> 395</body>
380<title>Installing Software from Sources</title> 398<title>Installing Software from Sources</title>
381<body> 399<body>
382 400
383<p> 401<p>
384Okay, enough talking, let's cut to the chase. To install a package, you will use 402Okay, 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 403the <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 404can 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 405&lt;category&gt;/&lt;package-name&gt;</c>. As an example we'll install
388<c>gnumeric</c>: 406<c>gnumeric</c>:
389</p> 407</p>
390 408
391<pre caption="Building gnumeric"> 409<pre caption="Building gnumeric">
392# <i>emerge gnumeric</i> 410# <i>emerge gnumeric</i>
393</pre> 411</pre>
394 412
395<p> 413<p>
396This will download the sourcecode for you and unpacks, compiles and installs the 414This will download the source code for you and unpacks, compiles and installs
397package on your system. It will also do the same for all the dependencies. If 415the package on your system. It will also do the same for all the dependencies.
398you want to see what dependencies will be installed with it, use the 416If you want to see what dependencies will be installed with it, use the
399<c>--pretend</c> option (<c>-p</c> in short): 417<c>--pretend</c> option (<c>-p</c> in short):
400</p> 418</p>
401 419
402<pre caption="Pretending to build gnumeric"> 420<pre caption="Pretending to build gnumeric">
403# <i>emerge --pretend gnumeric</i> 421# <i>emerge --pretend gnumeric</i>
404</pre> 422</pre>
405 423
406<p> 424<p>
407If you want to download the sourcecode of the package and its dependencies, 425If you want to download the source code of the package and its dependencies,
408but don't want to build the package, use the <c>--fetchonly</c> option 426but don't want to build the package, use the <c>--fetchonly</c> option
409(<c>-f</c> in short): 427(<c>-f</c> in short):
410</p> 428</p>
411 429
412<pre caption="Fetching sources for gnumeric"> 430<pre caption="Fetching sources for gnumeric">
438</p> 456</p>
439 457
440</body> 458</body>
441</subsection> 459</subsection>
442<subsection> 460<subsection>
443<title>Installing Prebuild Packages</title> 461<title>Installing Prebuilt Packages</title>
444<body> 462<body>
445 463
446<p> 464<p>
447When you want to install a prebuild package, you should use the <c>--usepkg</c> 465When 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 466option (<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 467<path>/usr/portage/packages/All</path> <e>if</e> the package and the version of
450the application you want to install match. 468the application you want to install match.
451</p> 469</p>
452 470
453<pre caption="Installing a prebuild package for gnumeric"> 471<pre caption="Installing a prebuilt package for gnumeric">
454# <i>emerge --usepkg gnumeric</i> 472# <i>emerge --usepkg gnumeric</i>
455</pre> 473</pre>
456 474
457<p> 475<p>
458If you want to use the binary package, even if the versions don't match, use 476If you want to use the binary package, even if the versions don't match, use
459<c>--usepkgonly</c> (<c>-K</c> in short). 477<c>--usepkgonly</c> (<c>-K</c> in short).
460</p> 478</p>
461 479
462<pre caption="Installing the prebuild package for gnumeric"> 480<pre caption="Installing the prebuilt package for gnumeric">
463# <i>emerge --usepkgonly gnumeric</i> 481# <i>emerge --usepkgonly gnumeric</i>
464</pre> 482</pre>
465 483
466<!-- TODO When handbook goes life, comment out this parts until the mirrors have
467 been updated with online GRP packages. -->
468<p> 484<p>
469If you don't have the prebuild package on your system yet, you can have 485If 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> 486<c>emerge</c> download it from a mirror, defined in the <c>PORTAGE_BINHOST</c>
471variable declared in <path>/etc/make.conf</path>. 487variable declared in <path>/etc/make.conf</path>.
472</p> 488</p>
473 489
474<p> 490<p>
475To download the binary package in case this package doesn't exist on 491To download the binary package in case this package doesn't exist on
476your system already, use <c>--getbinpkg</c> (<c>-g</c> in short): 492your system already, use <c>--getbinpkg</c> (<c>-g</c> in short):
477</p> 493</p>
478 494
479<pre caption="Downloading and installing a prebuild package for gnumeric"> 495<pre caption="Downloading and installing a prebuilt package for gnumeric">
480# <i>emerge --getbinpkg gnumeric</i> 496# <i>emerge --getbinpkg gnumeric</i>
481</pre> 497</pre>
482 498
483<p> 499<p>
484This will download the package and the package-related information for you and 500This 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 501install 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 502what dependencies will be installed with it, use the <c>--pretend</c> option
487(<c>-p</c> in short): 503(<c>-p</c> in short):
488</p> 504</p>
489 505
490<pre caption="Pretending to download the prebuild packages for gnumeric"> 506<pre caption="Pretending to download the prebuilt packages for gnumeric">
491# <i>emerge --ginbinpkg --pretend gnumeric</i> 507# <i>emerge --getbinpkg --pretend gnumeric</i>
492</pre> 508</pre>
493 509
494<p> 510<p>
495You can also opt to download the prebuild package (and the package-related 511You can also opt to download the prebuilt package (and the package-related
496information) <e>without</e> checking the information on your local system and 512information) <e>without</e> checking the information on your local system and
497<e>without</e> using the prebuild package already on your system (if 513<e>without</e> using the prebuilt package already on your system (if
498applicable), use the <c>--getbinpkgonly</c> option (<c>-G</c> in short): 514applicable), use the <c>--getbinpkgonly</c> option (<c>-G</c> in short):
499</p> 515</p>
500 516
501<pre caption="Installing a prebuild package without using local information"> 517<pre caption="Installing a prebuilt package without using local information">
502# <i>emerge --getbinpkgonly gnumeric</i> 518# <i>emerge --getbinpkgonly gnumeric</i>
503</pre> 519</pre>
504
505<!-- TODO Up until here -->
506 520
507<p> 521<p>
508You can also opt to install a specific version of a package. 522You 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 523For instance, if you want to install a gnumeric version older than 1.2 -- for
510any reason whatsoever :) you would type: 524any reason whatsoever :) you would type:
517<p> 531<p>
518Other possibilities are of course "&gt;" (later version) and "=" (the exact 532Other possibilities are of course "&gt;" (later version) and "=" (the exact
519version). 533version).
520</p> 534</p>
521 535
536
537</body>
538</subsection>
539<subsection>
540<title>Working with Dependencies</title>
541<body>
542
543<p>
544Portage has an extensive support for dependency handling. Although you usually
545don't need to even think about this (as dependencies are automatically handled
546by Portage) some users might want to know how you can work with <c>emerge</c>
547and dependencies.
548</p>
549
550<p>
551For instance, if you want Portage to pretend that none of the dependencies of a
552package are installed, you can use <c>--emptytree</c> (<c>-e</c> in short). This
553is useful with <c>--pretend</c> to display a complete tree of dependencies for
554any particular package. Without <c>--pretend</c>, <c>emerge</c> will (re)compile
555all listed packages.
556</p>
557
558<pre caption="Show all dependencies of gnumeric">
559# <i>emerge --emptytree --pretend gnumeric</i>
560</pre>
561
562<p>
563Another argument is <c>--nodeps</c>, which will ask Portage to try install the
564given package without taking care of the dependencies. It is trivial that this
565can lead to failures.
566</p>
567
568<pre caption="Installing gnumeric without taking care of the dependencies">
569# <i>emerge --nodeps gnumeric</i>
570</pre>
571
572<p>
573The opposite of <c>--nodeps</c> is <c>--onlydeps</c>, which will have Portage
574install all dependencies of a given package, but not the package itself:
575</p>
576
577<pre caption="Installing the dependencies of gnumeric">
578# <i>emerge --onlydeps gnumeric</i>
579</pre>
522 580
523</body> 581</body>
524</subsection> 582</subsection>
525<subsection> 583<subsection>
526<title>Updating your System</title> 584<title>Updating your System</title>
586 <li> 644 <li>
587 <e>N</e> (new) The package is new to your system and will be emerged for the 645 <e>N</e> (new) The package is new to your system and will be emerged for the
588 first time 646 first time
589 </li> 647 </li>
590 <li> 648 <li>
591 <e>R</e> (reemerge) The package isn't new, but needs to be reemerged 649 <e>R</e> (replace) The package isn't new, but needs to be reemerged
592 </li>
593 <li> 650 </li>
651 <li>
594 <e>F</e> (fetch) The package requires that you download the sourcecode 652 <e>F</e> (fetch) The package requires that you download the source code
595 manually (for instance due to licencing issues) 653 manually (for instance due to licencing issues)
596 </li> 654 </li>
597 <li> 655 <li>
598 <e>U</e> (update) The package already exists on your system but will be 656 <e>U</e> (update) The package already exists on your system but will be
599 upgraded 657 upgraded
609 removed. 667 removed.
610 </li> 668 </li>
611</ul> 669</ul>
612 670
613<p> 671<p>
614In certain cases, an update may mean a downgrade (i.e. install an older version 672We have mentioned that the <e>world</e> file doesn't contain dependencies. When
615instead of a newer version). If you don't want this to happen, use the 673you run <c>emerge --update world</c> only the packages mentioned in the
616<c>--upgradeonly</c> option (<c>-U</c> in short): 674<e>world</e> file and it's immediate dependencies are checked and, if necessary,
675upgraded. If you want <c>emerge</c> to check <e>all</e> the dependencies
676(including the dependencies of the dependencies), add the <c>--deep</c> flag:
617</p> 677</p>
618 678
619<pre caption="Upgrading your entire system"> 679<pre caption="Upgrading your entire system, including all dependencies">
620# <i>emerge --update --upgradeonly world</i> 680# <i>emerge --update --deep world</i>
621</pre> 681</pre>
622 682
623<p> 683<p>
624Of course, we are talking here about <e>system</e> and <e>world</e>, but you can 684Of course, we are talking here about <e>system</e> and <e>world</e>, but you can
625perform the same actions for individual software packages. 685perform the same actions for individual software packages.
654installed package. It also doesn't warn you if the package is part of 714installed package. It also doesn't warn you if the package is part of
655<e>system</e>, i.e. a core application necessary for the correct functioning of 715<e>system</e>, i.e. a core application necessary for the correct functioning of
656your system! 716your system!
657</warn> 717</warn>
658 718
719<p>
720Once the unmerge begins you will see a long list of filenames belonging to the
721package. Some of these filenames will have a flag displayed to the
722left of the filename. The flags <c>!mtime</c>, <c>!empty</c>, and <c>cfgpro</c>
723specify reasons why certain files are not being removed while the package is.
724Files listed without any of these three flags are removed from the
725filesystem successfully. The three flags specify the following reasons:
726</p>
727
728<ul>
729 <li>
730 <c>!mtime</c> : The listed file has been changed since it was installed,
731 probably by you or some tool
732 </li>
733 <li>
734 <c>!empty</c> : The listed directory is not empty
735 </li>
736 <li>
737 <c>cfgpro</c> : This file is located inside a protected directory and will
738 not be touched for safety
739 </li>
740</ul>
741
659</body> 742</body>
660</subsection> 743</subsection>
661</section> 744</section>
662<section> 745<section>
663<title>Software Availability</title> 746<title>Working with Masked Packages</title>
664<subsection> 747<subsection>
665<title>ARCH or not?</title> 748<title>ARCH or not?</title>
666<body> 749<body>
667 750
668<p> 751<p>
679to <e>ARCH</e> after being bugfree for a sufficient amount of time. 762to <e>ARCH</e> after being bugfree for a sufficient amount of time.
680</p> 763</p>
681 764
682<p> 765<p>
683Your system will use <e>ARCH</e> packages per default. If you want to live on 766Your system will use <e>ARCH</e> packages per default. If you want to live on
684the edge, don't mind having a broken package once in a while, and you like 767the edge, don't mind having a broken package once in a while, know how to deal
685submitting bugreports to <uri 768with a broken system and you like submitting bugreports to <uri
686link="http://bugs.gentoo.org">bugs.gentoo.org</uri>, then you can opt to use 769link="http://bugs.gentoo.org">bugs.gentoo.org</uri>, then you can opt to use
687<e>~ARCH</e> packages. To "move" your system to a <e>~ARCH</e>-using system, 770<e>~ARCH</e> packages. To "move" your system to a <e>~ARCH</e>-using system,
688edit the <c>ACCEPT_KEYWORDS</c> variable in <path>/etc/make.conf</path> so that 771edit the <c>ACCEPT_KEYWORDS</c> variable in <path>/etc/make.conf</path> so that
689it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.). 772it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.).
690</p> 773</p>
691 774
692<p> 775<p>
776Note though that it is far from trivial (if even impossible) to go back to
777<e>ARCH</e> from <e>~ARCH</e>.
778</p>
779
780<p>
693If you want to update your system now, you will notice that <e>a lot</e> of 781If you want to update your system now, you will notice that <e>a lot</e> of
694packages will be updated! 782packages will be updated!
695</p> 783</p>
696 784
697</body> 785</body>
717 <li>The package is in <e>~ARCH</e> while you use <e>ARCH</e></li> 805 <li>The package is in <e>~ARCH</e> while you use <e>ARCH</e></li>
718 <li>The package is hard-masked explicitly</li> 806 <li>The package is hard-masked explicitly</li>
719</ol> 807</ol>
720 808
721<p> 809<p>
722If the package is masked because of the first reason, and you <e>really</e> want 810If the package is masked because of the first reason, and you <e>really</e>
723to install it (knowing that there <e>is</e> a reason why it isn't available in 811want to install it (knowing that there <e>is</e> a reason why it isn't
724<e>ARCH</e>), you can temporarily accept <e>~ARCH</e> packages: 812available in <e>ARCH</e>), you can accept the <e>~ARCH</e> version of any
813package by adding it to your <path>/etc/portage/package.keywords</path> file:
725</p> 814</p>
726 815
727<pre caption="Temporarily accepting ~ARCH packages"> 816<pre caption="Accepting the ~ARCH version of a package">
728# <i>ACCEPT_KEYWORDS="~x86" emerge gnumeric</i> 817<comment>(Create the /etc/portage directory if it doesn't exist yet)</comment>
818# <i>mkdir /etc/portage</i>
819
820# <i>echo "app-office/gnumeric ~x86" &gt;&gt; /etc/portage/package.keywords</i>
821# <i>emerge gnumeric</i>
729</pre> 822</pre>
730 823
731<p> 824<p>
732A package is hardmasked if it is listed in 825A package is hardmasked if it is listed in
733<path>/usr/portage/profiles/package.mask</path>. If you read this file, you 826<path>/usr/portage/profiles/package.mask</path>. If you read this file, you
737"breaks other packages", or "badly needs testing"), create the 830"breaks other packages", or "badly needs testing"), create the
738<path>/etc/portage/package.unmask</path> file and list the package in it (use 831<path>/etc/portage/package.unmask</path> file and list the package in it (use
739the same format as is used in <path>/usr/portage/profiles/package.mask</path>). 832the same format as is used in <path>/usr/portage/profiles/package.mask</path>).
740</p> 833</p>
741 834
835<pre caption="Unmasking a hard-masked application">
836<comment>(Create the /etc/portage directory if it doesn't exist yet)</comment>
837# <i>mkdir /etc/portage</i>
838
839# <i>echo "=app-office/gnumeric-1.2.12" &gt;&gt; /etc/portage/package.unmask</i>
840</pre>
841
742<p> 842<p>
743Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as 843Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as
744all changes are undone the next time you update your Portage tree. 844all changes are undone the next time you update your Portage tree.
745</p>
746
747<p> 845</p>
748Another trick to circumvent the "masked package" problem is to install the 846
749package using the full path. This will ignore both the <c>ACCEPT_KEYWORD</c>
750settings and the <path>package.mask</path> listing.
751</p> 847<p>
848Sometimes you might want to hardmask a (collection of) package(s). This is the
849case when newer versions of an application don't support something you require
850or when these versions break something else in your environment.
851</p>
752 852
753<pre caption="Installing a package without checking for stadium / masking"> 853<p>
754# <i>emerge /usr/portage/app-office/gnumeric/gnumeric-1.2.0.ebuild</i> 854To hard-mask a package, create <path>/etc/portage/package.mask</path> and list the
855package in it (use the same format as mentioned above).
856</p>
857
858<pre caption="Hard-masking a package">
859<comment>(Create the /etc/portage directory if it doesn't exist yet)</comment>
860# <i>mkdir /etc/portage</i>
861
862# <i>echo "&gt;app-office/gnumeric-1.2.10" &gt;&gt; /etc/portage/package.mask</i>
755</pre> 863</pre>
756 864
757</body> 865</body>
758</subsection> 866</subsection>
759<subsection> 867<subsection>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20