/[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.32
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.32 2004/08/21 18:08:12 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
87dev-lisp/ gnome-extra/ net-p2p/ 90dev-lisp/ gnome-extra/ net-p2p/
88</pre> 91</pre>
89 92
90<p> 93<p>
91As you can see, the Portage tree has several subdirectories. Most of them are 94As you can see, the Portage tree has several subdirectories. Most of them are
92the <e>categories</e> in which the Gentoo packages, called <e>ebuilds</e>, 95the <e>categories</e> in which the Gentoo packages reside. Take a look at, for
93reside. Take a look at, for instance, <path>app-office</path>: 96instance, <path>app-office</path>:
94</p> 97</p>
95 98
96<pre caption="Viewing a category"> 99<pre caption="Viewing a category">
97# <i>cd app-office; ls --classify</i> 100# <i>cd app-office; ls --classify</i>
98abiword/ gnotime/ kmymoney2/ ooodi/ plan/ timestamp.x 101abiword/ gnotime/ kmymoney2/ ooodi/ plan/ timestamp.x
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>
114ChangeLog files/ openoffice-1.0.3-r1.ebuild openoffice-1.1.0-r2.ebuild 117ChangeLog files/ openoffice-1.0.3-r1.ebuild openoffice-1.1.0-r2.ebuild
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 122In the example directory, four ebuilds are stored. An <e>ebuild</e> is a script
120the example directory four of such ebuilds are stored. Their naming is 123which contains all the necessary information about a specific version of a
121almost identical: they only differ in the version name. 124package. The naming for the ebuilds is almost identical; they only differ in
125the version name.
122You are free to view the contents of such a package: they are plain scripts. We 126You are free to view the contents of such an ebuild: they are plain scripts. We
123will not discuss it right now as it isn't important to know if you plan on just 127will not discuss it right now as it isn't important to know if you plan on just
124using Gentoo. 128using Gentoo.
125</p> 129</p>
126 130
127<p> 131<p>
128The other files are the <path>ChangeLog</path> (which contains a listing of all 132The 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 133the changes done to the ebuilds), <path>Manifest</path> (which contains the
130checksums and permissions of all the files in the directory) and 134checksums and filesizes of all the files in the directory) and
131<path>metadata.xml</path> (which contains more information about the package, 135<path>metadata.xml</path> (which contains more information about the package,
132such as the responsible development group -- called <e>herd</e> -- and a more 136such as the responsible development group -- called <e>herd</e> -- and a more
133extensive description). 137extensive description).
134</p> 138</p>
135 139
136<p> 140<p>
137Inside the <path>files</path> directory you will find extra files, needed by 141Inside the <path>files</path> directory, you will find extra files, needed by
138Portage: digests (checksums and permissions of the files needed by a single 142Portage: digests (names, sizes and checksums of the files needed by a single
139version of the package), patches, example configuration files, etc. 143version of the package), patches, example configuration files, etc.
140</p> 144</p>
141 145
142<pre caption="Viewing the extra files"> 146<pre caption="Viewing the extra files">
143# <i>cd files; ls --classify</i> 147# <i>cd files; ls --classify</i>
150nptl.patch 154nptl.patch
151</pre> 155</pre>
152 156
153<p> 157<p>
154If you go back to the root of the Portage tree (<path>/usr/portage</path>) you 158If 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 159will notice that there are other, non-category directories, too. We will discuss
156those later in this chapter. 160those later in this chapter.
157</p> 161</p>
158 162
159</body> 163</body>
160</subsection> 164</subsection>
224 228
225<p> 229<p>
226You see something new? Yes, <e>downloaded files</e>. When you tell Portage to 230You 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 231install a package, it of course needs to have the necessary sources (or
228precompiled packages) available. It therefore checks the contents of 232precompiled packages) available. It therefore checks the contents of
229<path>/usr/portage/distfiles</path> (for sourcecode) or 233<path>/usr/portage/distfiles</path> to see if the
230<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 thay directory.
233</p> 236</p>
234
235<note>
236Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very
237time consuming. There are other, more performant tools available. We will
238describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and
239Other Tools</uri>.
240</note>
241 237
242</body> 238</body>
243</subsection> 239</subsection>
244<subsection> 240<subsection>
245<title>Viewing the ChangeLog</title> 241<title>Viewing the ChangeLog</title>
246<body> 242<body>
247 243
248<p> 244<p>
249While browsing through the Portage Tree, you saw that there was a ChangeLog for 245While 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 246each package. You can view the ChangeLog entries between the available version
247and 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 248<c>--pretend --changelog</c> (<c>-pl</c> in short) options. As an example we
252will view the ChangeLog entries for <c>gnumeric</c>: 249will view the ChangeLog entries for <c>gnumeric</c>:
253</p> 250</p>
254 251
255<pre caption="Viewing the ChangeLog entries for gnumeric"> 252<pre caption="Viewing the ChangeLog entries for gnumeric">
256# <i>emerge --pretend --changelog gnumeric</i> 253# <i>emerge --pretend --changelog gnumeric</i>
254<comment>(Some output removed to improve readability)</comment>
255*gnumeric-1.2.2
256
257 27 Nov 2003; foser &lt;foser@gentoo.org&gt; gnumeric-1.2.2.ebuild :
258 New release, requested in #34492
259 updated deps
260
261 12 Nov 2003; Jason Wever &lt;weeve@gentoo.org&gt; gnumeric-1.2.0.ebuild:
262 Marked stable on sparc, fixes bug #32405.
263
264 14 Oct 2003; Jason Wever &lt;weeve@gentoo.org&gt; gnumeric-1.0.8.ebuild:
265 Added ~sparc keyword. Fixes bug #31150.
257</pre> 266</pre>
258 267
259</body> 268</body>
260</subsection> 269</subsection>
261</section> 270</section>
298# <i>emerge --usepkg mirrorselect</i> 307# <i>emerge --usepkg mirrorselect</i>
299</pre> 308</pre>
300 309
301<p> 310<p>
302Now run <c>mirrorselect</c> to automatically select mirrors for you (it will 311Now run <c>mirrorselect</c> to automatically select mirrors for you (it will
303also setup Portage to use a mirror for the sourcecode): 312also setup Portage to use a mirror for the source code):
304</p> 313</p>
305 314
306<pre caption="Running mirrorselect"> 315<pre caption="Running mirrorselect">
307# <i>mirrorselect -a -s3</i> 316# <i>mirrorselect -a -s3</i>
308</pre> 317</pre>
336</subsection> 345</subsection>
337</section> 346</section>
338<section> 347<section>
339<title>Maintaining Software</title> 348<title>Maintaining Software</title>
340<subsection> 349<subsection>
341<title>Building or Prebuild?</title> 350<title>Building or Prebuilt?</title>
342<body> 351<body>
343 352
344<p> 353<p>
345Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to 354Gentoo 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 355install 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 356using a <e>prebuilt</e> package. But what are the advantages/disadvantages of
348both approaches, and can they be used next to each other? 357both approaches, and can they be used next to each other?
349</p> 358</p>
350 359
351<p> 360<p>
352As you probably have guessed, building packages takes a lot of time (especially 361As 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> 366Of course, you can also define high optimization options (in the <c>CFLAGS</c>
358and <c>CXXFLAGS</c> variables) to compile the package with. 367and <c>CXXFLAGS</c> variables) to compile the package with.
359</p> 368</p>
360 369
361<p> 370<p>
362Using prebuild packages improves the installation time (as no more compilation 371Using 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 372is needed), but you will lose the advantages of the <c>USE</c> setting and the
364<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables. 373<c>CFLAGS</c> &amp; <c>CXXFLAGS</c> variables.
365</p> 374</p>
366 375
367<p> 376<p>
368As previously stated, prebuild packages are stored in the 377As previously stated, prebuilt packages are stored in the
369<path>/usr/portage/packages/All</path> directory, while the sourcecode of the 378<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 379packages is placed in <path>/usr/portage/distfiles</path>. If you have finished
371installing a package you can remove the package or sourcecode from the 380installing a package you can remove the package or source code from the
372respective directory. However, you might want to keep the package/sourcecode of 381respective 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 382the latest version, just in case you want to reinstall the package (so you don't
374have to redownload it). 383have to redownload it).
375</p> 384</p>
376 385
377</body> 386</body>
380<title>Installing Software from Sources</title> 389<title>Installing Software from Sources</title>
381<body> 390<body>
382 391
383<p> 392<p>
384Okay, enough talking, let's cut to the chase. To install a package, you will use 393Okay, 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 394the <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 395can 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 396&lt;category&gt;/&lt;package-name&gt;</c>. As an example we'll install
388<c>gnumeric</c>: 397<c>gnumeric</c>:
389</p> 398</p>
390 399
391<pre caption="Building gnumeric"> 400<pre caption="Building gnumeric">
392# <i>emerge gnumeric</i> 401# <i>emerge gnumeric</i>
393</pre> 402</pre>
394 403
395<p> 404<p>
396This will download the sourcecode for you and unpacks, compiles and installs the 405This 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 406the 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 407If you want to see what dependencies will be installed with it, use the
399<c>--pretend</c> option (<c>-p</c> in short): 408<c>--pretend</c> option (<c>-p</c> in short):
400</p> 409</p>
401 410
402<pre caption="Pretending to build gnumeric"> 411<pre caption="Pretending to build gnumeric">
403# <i>emerge --pretend gnumeric</i> 412# <i>emerge --pretend gnumeric</i>
404</pre> 413</pre>
405 414
406<p> 415<p>
407If you want to download the sourcecode of the package and its dependencies, 416If 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 417but don't want to build the package, use the <c>--fetchonly</c> option
409(<c>-f</c> in short): 418(<c>-f</c> in short):
410</p> 419</p>
411 420
412<pre caption="Fetching sources for gnumeric"> 421<pre caption="Fetching sources for gnumeric">
438</p> 447</p>
439 448
440</body> 449</body>
441</subsection> 450</subsection>
442<subsection> 451<subsection>
443<title>Installing Prebuild Packages</title> 452<title>Installing Prebuilt Packages</title>
444<body> 453<body>
445 454
446<p> 455<p>
447When you want to install a prebuild package, you should use the <c>--usepkg</c> 456When 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 457option (<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 458<path>/usr/portage/packages/All</path> <e>if</e> the package and the version of
450the application you want to install match. 459the application you want to install match.
451</p> 460</p>
452 461
453<pre caption="Installing a prebuild package for gnumeric"> 462<pre caption="Installing a prebuilt package for gnumeric">
454# <i>emerge --usepkg gnumeric</i> 463# <i>emerge --usepkg gnumeric</i>
455</pre> 464</pre>
456 465
457<p> 466<p>
458If you want to use the binary package, even if the versions don't match, use 467If you want to use the binary package, even if the versions don't match, use
459<c>--usepkgonly</c> (<c>-K</c> in short). 468<c>--usepkgonly</c> (<c>-K</c> in short).
460</p> 469</p>
461 470
462<pre caption="Installing the prebuild package for gnumeric"> 471<pre caption="Installing the prebuilt package for gnumeric">
463# <i>emerge --usepkgonly gnumeric</i> 472# <i>emerge --usepkgonly gnumeric</i>
464</pre> 473</pre>
465 474
466<!-- TODO When handbook goes life, comment out this parts until the mirrors have
467 been updated with online GRP packages. -->
468<p> 475<p>
469If you don't have the prebuild package on your system yet, you can have 476If 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> 477<c>emerge</c> download it from a mirror, defined in the <c>PORTAGE_BINHOST</c>
471variable declared in <path>/etc/make.conf</path>. 478variable declared in <path>/etc/make.conf</path>.
472</p> 479</p>
473 480
481<note>
482Gentoo does not have any server or mirror containing such prebuilt packages.
483Portage has been extended with this feature to fullfil the community request.
484</note>
485
474<p> 486<p>
475To download the binary package in case this package doesn't exist on 487To download the binary package in case this package doesn't exist on
476your system already, use <c>--getbinpkg</c> (<c>-g</c> in short): 488your system already, use <c>--getbinpkg</c> (<c>-g</c> in short):
477</p> 489</p>
478 490
479<pre caption="Downloading and installing a prebuild package for gnumeric"> 491<pre caption="Downloading and installing a prebuilt package for gnumeric">
480# <i>emerge --getbinpkg gnumeric</i> 492# <i>emerge --getbinpkg gnumeric</i>
481</pre> 493</pre>
482 494
483<p> 495<p>
484This will download the package and the package-related information for you and 496This 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 497install 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 498what dependencies will be installed with it, use the <c>--pretend</c> option
487(<c>-p</c> in short): 499(<c>-p</c> in short):
488</p> 500</p>
489 501
490<pre caption="Pretending to download the prebuild packages for gnumeric"> 502<pre caption="Pretending to download the prebuilt packages for gnumeric">
491# <i>emerge --ginbinpkg --pretend gnumeric</i> 503# <i>emerge --getbinpkg --pretend gnumeric</i>
492</pre> 504</pre>
493 505
494<p> 506<p>
495You can also opt to download the prebuild package (and the package-related 507You can also opt to download the prebuilt package (and the package-related
496information) <e>without</e> checking the information on your local system and 508information) <e>without</e> checking the information on your local system and
497<e>without</e> using the prebuild package already on your system (if 509<e>without</e> using the prebuilt package already on your system (if
498applicable), use the <c>--getbinpkgonly</c> option (<c>-G</c> in short): 510applicable), use the <c>--getbinpkgonly</c> option (<c>-G</c> in short):
499</p> 511</p>
500 512
501<pre caption="Installing a prebuild package without using local information"> 513<pre caption="Installing a prebuilt package without using local information">
502# <i>emerge --getbinpkgonly gnumeric</i> 514# <i>emerge --getbinpkgonly gnumeric</i>
503</pre> 515</pre>
504
505<!-- TODO Up until here -->
506 516
507<p> 517<p>
508You can also opt to install a specific version of a package. 518You 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 519For instance, if you want to install a gnumeric version older than 1.2 -- for
510any reason whatsoever :) you would type: 520any reason whatsoever :) you would type:
517<p> 527<p>
518Other possibilities are of course "&gt;" (later version) and "=" (the exact 528Other possibilities are of course "&gt;" (later version) and "=" (the exact
519version). 529version).
520</p> 530</p>
521 531
532
533</body>
534</subsection>
535<subsection>
536<title>Working with Dependencies</title>
537<body>
538
539<p>
540Portage has an extensive support for dependency handling. Although you usually
541don't need to even think about this (as dependencies are automatically handled
542by Portage) some users might want to know how you can work with <c>emerge</c>
543and dependencies.
544</p>
545
546<p>
547For instance, if you want Portage to pretend that none of the dependencies of a
548package are installed, you can use <c>--emptytree</c> (<c>-e</c> in short). This
549is useful with <c>--pretend</c> to display a complete tree of dependencies for
550any particular package. Without <c>--pretend</c>, <c>emerge</c> will (re)compile
551all listed packages.
552</p>
553
554<pre caption="Show all dependencies of gnumeric">
555# <i>emerge --emptytree --pretend gnumeric</i>
556</pre>
557
558<p>
559Another argument is <c>--nodeps</c>, which will ask Portage to try install the
560given package without taking care of the dependencies. It is trivial that this
561can lead to failures.
562</p>
563
564<pre caption="Installing gnumeric without taking care of the dependencies">
565# <i>emerge --nodeps gnumeric</i>
566</pre>
567
568<p>
569The opposite of <c>--nodeps</c> is <c>--onlydeps</c>, which will have Portage
570install all dependencies of a given package, but not the package itself:
571</p>
572
573<pre caption="Installing the dependencies of gnumeric">
574# <i>emerge --onlydeps gnumeric</i>
575</pre>
522 576
523</body> 577</body>
524</subsection> 578</subsection>
525<subsection> 579<subsection>
526<title>Updating your System</title> 580<title>Updating your System</title>
586 <li> 640 <li>
587 <e>N</e> (new) The package is new to your system and will be emerged for the 641 <e>N</e> (new) The package is new to your system and will be emerged for the
588 first time 642 first time
589 </li> 643 </li>
590 <li> 644 <li>
591 <e>R</e> (reemerge) The package isn't new, but needs to be reemerged 645 <e>R</e> (replace) The package isn't new, but will be reemerged
592 </li> 646 </li>
593 <li> 647 <li>
594 <e>F</e> (fetch) The package requires that you download the sourcecode 648 <e>F</e> (fetch) The package requires that you download the source code
595 manually (for instance due to licencing issues) 649 manually (for instance due to licencing issues)
596 </li> 650 </li>
597 <li> 651 <li>
598 <e>U</e> (update) The package already exists on your system but will be 652 <e>U</e> (update) The package already exists on your system but will be
599 upgraded 653 upgraded
600 </li> 654 </li>
601 <li> 655 <li>
602 <e>UD</e> (downgrade) The package already exists on your system but will be 656 <e>UD</e> (downgrade) The package already exists on your system but will be
603 downgraded 657 downgraded
604 </li> 658 </li>
605 <li>
606 <e>U-</e> (slot warning) The package you have installed on your system
607 is listed as a package that can not coexist with a different version, but
608 your update does. The update will be installed and the older version will be
609 removed.
610 </li>
611</ul> 659</ul>
612 660
613<p> 661<p>
614In certain cases, an update may mean a downgrade (i.e. install an older version 662We 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 663you run <c>emerge --update world</c> only the packages mentioned in the
616<c>--upgradeonly</c> option (<c>-U</c> in short): 664<e>world</e> file and it's immediate dependencies are checked and, if necessary,
665upgraded. If you want <c>emerge</c> to check <e>all</e> the dependencies
666(including the dependencies of the dependencies), add the <c>--deep</c> flag:
617</p> 667</p>
618 668
619<pre caption="Upgrading your entire system"> 669<pre caption="Upgrading your entire system, including all dependencies">
620# <i>emerge --update --upgradeonly world</i> 670# <i>emerge --update --deep world</i>
621</pre> 671</pre>
622 672
623<p> 673<p>
624Of course, we are talking here about <e>system</e> and <e>world</e>, but you can 674Of course, we are talking here about <e>system</e> and <e>world</e>, but you can
625perform the same actions for individual software packages. 675perform the same actions for individual software packages.
654installed package. It also doesn't warn you if the package is part of 704installed 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 705<e>system</e>, i.e. a core application necessary for the correct functioning of
656your system! 706your system!
657</warn> 707</warn>
658 708
709<p>
710Once the unmerge begins you will see a long list of filenames belonging to the
711package. Some of these filenames will have a flag displayed to the
712left of the filename. The flags <c>!mtime</c>, <c>!empty</c>, and <c>cfgpro</c>
713specify reasons why certain files are not being removed while the package is.
714Files listed without any of these three flags are removed from the
715filesystem successfully. The three flags specify the following reasons:
716</p>
717
718<ul>
719 <li>
720 <c>!mtime</c> : The listed file has been changed since it was installed,
721 probably by you or some tool
722 </li>
723 <li>
724 <c>!empty</c> : The listed directory is not empty
725 </li>
726 <li>
727 <c>cfgpro</c> : This file is located inside a protected directory and will
728 not be touched for safety
729 </li>
730</ul>
731
659</body> 732</body>
660</subsection> 733</subsection>
661</section> 734</section>
662<section> 735<section>
663<title>Software Availability</title> 736<title>Working with Masked Packages</title>
664<subsection> 737<subsection>
665<title>ARCH or not?</title> 738<title>ARCH or not?</title>
666<body> 739<body>
667 740
668<p> 741<p>
679to <e>ARCH</e> after being bugfree for a sufficient amount of time. 752to <e>ARCH</e> after being bugfree for a sufficient amount of time.
680</p> 753</p>
681 754
682<p> 755<p>
683Your system will use <e>ARCH</e> packages per default. If you want to live on 756Your 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 757the edge, don't mind having a broken package once in a while, know how to deal
685submitting bugreports to <uri 758with 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 759link="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, 760<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 761edit 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.). 762it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.).
690</p> 763</p>
691 764
692<p> 765<p>
766Note though that it is far from trivial (if even impossible) to go back to
767<e>ARCH</e> from <e>~ARCH</e>.
768</p>
769
770<p>
693If you want to update your system now, you will notice that <e>a lot</e> of 771If you want to update your system now, you will notice that <e>a lot</e> of
694packages will be updated! 772packages will be updated!
695</p> 773</p>
696 774
697</body> 775</body>
708Calculating dependencies 786Calculating dependencies
709!!! <comment>all ebuilds that could satisfy </comment>&lt;your package&gt;<comment> have been masked.</comment> 787!!! <comment>all ebuilds that could satisfy </comment>&lt;your package&gt;<comment> have been masked.</comment>
710</pre> 788</pre>
711 789
712<p> 790<p>
713A package can be masked due to two reasons: 791A package can be masked due to several reasons:
714</p> 792</p>
715 793
716<ol> 794<ol>
717 <li>The package is in <e>~ARCH</e> while you use <e>ARCH</e></li> 795 <li>The package is in <e>~ARCH</e> while you use <e>ARCH</e></li>
718 <li>The package is hard-masked explicitly</li> 796 <li>The package is hard-masked explicitly</li>
797 <li>The package isn't available for your ARCH entirely</li>
798 <li>The package is masked by your profile</li>
719</ol> 799</ol>
720 800
721<p> 801<p>
722If the package is masked because of the first reason, and you <e>really</e> want 802If 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 803want 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: 804available in <e>ARCH</e>), you can accept the <e>~ARCH</e> version of any
805package by adding it to your <path>/etc/portage/package.keywords</path> file:
725</p> 806</p>
726 807
727<pre caption="Temporarily accepting ~ARCH packages"> 808<pre caption="Accepting the ~ARCH version of a package">
728# <i>ACCEPT_KEYWORDS="~x86" emerge gnumeric</i> 809<comment>(Create the /etc/portage directory if it doesn't exist yet)</comment>
810# <i>mkdir /etc/portage</i>
811
812# <i>echo "app-office/gnumeric ~x86" &gt;&gt; /etc/portage/package.keywords</i>
813# <i>emerge gnumeric</i>
729</pre> 814</pre>
730 815
731<p> 816<p>
732A package is hardmasked if it is listed in 817A package is hardmasked if it is listed in
733<path>/usr/portage/profiles/package.mask</path>. If you read this file, you 818<path>/usr/portage/profiles/package.mask</path>. If you read this file, you
737"breaks other packages", or "badly needs testing"), create the 822"breaks other packages", or "badly needs testing"), create the
738<path>/etc/portage/package.unmask</path> file and list the package in it (use 823<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>). 824the same format as is used in <path>/usr/portage/profiles/package.mask</path>).
740</p> 825</p>
741 826
827<pre caption="Unmasking a hard-masked application">
828<comment>(Create the /etc/portage directory if it doesn't exist yet)</comment>
829# <i>mkdir /etc/portage</i>
830
831# <i>echo "=app-office/gnumeric-1.2.12" &gt;&gt; /etc/portage/package.unmask</i>
832</pre>
833
742<p> 834<p>
743Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as 835Do <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. 836all changes are undone the next time you update your Portage tree.
745</p>
746
747<p> 837</p>
748Another trick to circumvent the "masked package" problem is to install the 838
749package using the full path. This will ignore both the <c>ACCEPT_KEYWORD</c>
750settings and the <path>package.mask</path> listing.
751</p> 839<p>
840Sometimes you might want to hardmask a (collection of) package(s). This is the
841case when newer versions of an application don't support something you require
842or when these versions break something else in your environment.
843</p>
752 844
753<pre caption="Installing a package without checking for stadium / masking"> 845<p>
754# <i>emerge /usr/portage/app-office/gnumeric/gnumeric-1.2.0.ebuild</i> 846To hard-mask a package, create <path>/etc/portage/package.mask</path> and list the
847package in it (use the same format as mentioned above).
848</p>
849
850<pre caption="Hard-masking a package">
851<comment>(Create the /etc/portage directory if it doesn't exist yet)</comment>
852# <i>mkdir /etc/portage</i>
853
854# <i>echo "&gt;app-office/gnumeric-1.2.10" &gt;&gt; /etc/portage/package.mask</i>
755</pre> 855</pre>
756 856
757</body> 857</body>
758</subsection> 858</subsection>
759<subsection> 859<subsection>

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

  ViewVC Help
Powered by ViewVC 1.1.20