| 1 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
| 4 |
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
|
| 6 |
|
| 7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.80 2012/07/24 12:12:52 swift Exp $ -->
|
| 8 |
|
| 9 |
<sections>
|
| 10 |
|
| 11 |
<abstract>
|
| 12 |
This chapter explains the "simple" steps a user definitely needs to know to
|
| 13 |
maintain the software on his system.
|
| 14 |
</abstract>
|
| 15 |
|
| 16 |
<version>7</version>
|
| 17 |
<date>2012-08-15</date>
|
| 18 |
|
| 19 |
<section>
|
| 20 |
<title>Welcome to Portage</title>
|
| 21 |
<body>
|
| 22 |
|
| 23 |
<p>
|
| 24 |
Portage is probably Gentoo's most notable innovation in software management.
|
| 25 |
With its high flexibility and enormous amount of features it is frequently seen
|
| 26 |
as the best software management tool available for Linux.
|
| 27 |
</p>
|
| 28 |
|
| 29 |
<p>
|
| 30 |
Portage is completely written in <uri link="http://www.python.org">Python</uri>
|
| 31 |
and <uri link="http://www.gnu.org/software/bash">Bash</uri> and therefore fully
|
| 32 |
visible to the users as both are scripting languages.
|
| 33 |
</p>
|
| 34 |
|
| 35 |
<p>
|
| 36 |
Most users will work with Portage through the <c>emerge</c> tool. This chapter
|
| 37 |
is not meant to duplicate the information available from the emerge man page.
|
| 38 |
For a complete rundown of emerge's options, please consult the man page:
|
| 39 |
</p>
|
| 40 |
|
| 41 |
<pre caption="Reading the emerge man page">
|
| 42 |
$ <i>man emerge</i>
|
| 43 |
</pre>
|
| 44 |
|
| 45 |
</body>
|
| 46 |
</section>
|
| 47 |
<section>
|
| 48 |
<title>The Portage Tree</title>
|
| 49 |
<subsection>
|
| 50 |
<title>Ebuilds</title>
|
| 51 |
<body>
|
| 52 |
|
| 53 |
<p>
|
| 54 |
When we talk about packages, we often mean software titles that are available to
|
| 55 |
the Gentoo users through the Portage tree. The Portage tree is a collection of
|
| 56 |
<e>ebuilds</e>, files that contain all information Portage needs to maintain
|
| 57 |
software (install, search, query, ...). These ebuilds reside in
|
| 58 |
<path>/usr/portage</path> by default.
|
| 59 |
</p>
|
| 60 |
|
| 61 |
<p>
|
| 62 |
Whenever you ask Portage to perform some action regarding software titles, it
|
| 63 |
will use the ebuilds on your system as a base. It is therefore important that
|
| 64 |
you regularly update the ebuilds on your system so Portage knows about new
|
| 65 |
software, security updates, etc.
|
| 66 |
</p>
|
| 67 |
|
| 68 |
</body>
|
| 69 |
</subsection>
|
| 70 |
<subsection>
|
| 71 |
<title>Updating the Portage Tree</title>
|
| 72 |
<body>
|
| 73 |
|
| 74 |
<p>
|
| 75 |
The Portage tree is usually updated with <uri
|
| 76 |
link="http://rsync.samba.org/">rsync</uri>, a fast incremental file transfer
|
| 77 |
utility. Updating is fairly simple as the <c>emerge</c> command provides a
|
| 78 |
front-end for rsync:
|
| 79 |
</p>
|
| 80 |
|
| 81 |
<pre caption="Updating the Portage tree">
|
| 82 |
# <i>emerge --sync</i>
|
| 83 |
</pre>
|
| 84 |
|
| 85 |
<p>
|
| 86 |
If you are unable to rsync due to firewall restrictions you can still update
|
| 87 |
your Portage tree by using our daily generated Portage tree snapshots. The
|
| 88 |
<c>emerge-webrsync</c> tool automatically fetches and installs the latest
|
| 89 |
snapshot on your system:
|
| 90 |
</p>
|
| 91 |
|
| 92 |
<pre caption="Running emerge-webrsync">
|
| 93 |
# <i>emerge-webrsync</i>
|
| 94 |
</pre>
|
| 95 |
|
| 96 |
<p>
|
| 97 |
An additional advantage of using <c>emerge-webrsync</c> is that it allows the
|
| 98 |
administrator to only pull in portage tree snapshots that are signed by the
|
| 99 |
Gentoo release engineering GPG key. More information on this can be found
|
| 100 |
in the <uri link="?part=2&chap=3">Portage Features</uri> section on
|
| 101 |
<uri link="?part=2&chap=3#webrsync-gpg">Fetching Validated Portage Tree
|
| 102 |
Snapshots</uri>.
|
| 103 |
</p>
|
| 104 |
|
| 105 |
</body>
|
| 106 |
</subsection>
|
| 107 |
</section>
|
| 108 |
<section>
|
| 109 |
<title>Maintaining Software</title>
|
| 110 |
<subsection>
|
| 111 |
<title>Searching for Software</title>
|
| 112 |
<body>
|
| 113 |
|
| 114 |
<p>
|
| 115 |
To search through the Portage tree after software titles, you can use
|
| 116 |
<c>emerge</c> built-in search capabilities. By default, <c>emerge --search</c>
|
| 117 |
returns the names of packages whose title matches (either fully or partially)
|
| 118 |
the given search term.
|
| 119 |
</p>
|
| 120 |
|
| 121 |
<p>
|
| 122 |
For instance, to search for all packages who have "pdf" in their name:
|
| 123 |
</p>
|
| 124 |
|
| 125 |
<pre caption="Searching for pdf-named packages">
|
| 126 |
$ <i>emerge --search pdf</i>
|
| 127 |
</pre>
|
| 128 |
|
| 129 |
<p>
|
| 130 |
If you want to search through the descriptions as well you can use the
|
| 131 |
<c>--searchdesc</c> (or <c>-S</c>) switch:
|
| 132 |
</p>
|
| 133 |
|
| 134 |
<pre caption="Searching for pdf-related packages">
|
| 135 |
$ <i>emerge --searchdesc pdf</i>
|
| 136 |
</pre>
|
| 137 |
|
| 138 |
<p>
|
| 139 |
When you take a look at the output, you'll notice that it gives you a lot of
|
| 140 |
information. The fields are clearly labelled so we won't go further into their
|
| 141 |
meanings:
|
| 142 |
</p>
|
| 143 |
|
| 144 |
<pre caption="Example 'emerge --search' output">
|
| 145 |
* net-print/cups-pdf
|
| 146 |
Latest version available: 1.5.2
|
| 147 |
Latest version installed: [ Not Installed ]
|
| 148 |
Size of downloaded files: 15 kB
|
| 149 |
Homepage: http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/
|
| 150 |
Description: Provides a virtual printer for CUPS to produce PDF files.
|
| 151 |
License: GPL-2
|
| 152 |
</pre>
|
| 153 |
|
| 154 |
</body>
|
| 155 |
</subsection>
|
| 156 |
<subsection>
|
| 157 |
<title>Installing Software</title>
|
| 158 |
<body>
|
| 159 |
|
| 160 |
<p>
|
| 161 |
Once you've found a software title to your liking, you can easily install it
|
| 162 |
with <c>emerge</c>: just add the package name. For instance, to install
|
| 163 |
<c>gnumeric</c>:
|
| 164 |
</p>
|
| 165 |
|
| 166 |
<pre caption="Installing gnumeric">
|
| 167 |
# <i>emerge gnumeric</i>
|
| 168 |
</pre>
|
| 169 |
|
| 170 |
<p>
|
| 171 |
Since many applications depend on each other, any attempt to install a certain
|
| 172 |
software package might result in the installation of several dependencies as
|
| 173 |
well. Don't worry, Portage handles dependencies well. If you want to find out
|
| 174 |
what Portage <e>would</e> install when you ask it to install a certain package,
|
| 175 |
add the <c>--pretend</c> switch. For instance:
|
| 176 |
</p>
|
| 177 |
|
| 178 |
<pre caption="Pretend to install gnumeric">
|
| 179 |
# <i>emerge --pretend gnumeric</i>
|
| 180 |
</pre>
|
| 181 |
|
| 182 |
<p>
|
| 183 |
When you ask Portage to install a package, it will download the necessary source
|
| 184 |
code from the internet (if necessary) and store it by default in
|
| 185 |
<path>/usr/portage/distfiles</path>. After this it will unpack, compile and
|
| 186 |
install the package. If you want Portage to only download the sources without
|
| 187 |
installing them, add the <c>--fetchonly</c> option to the <c>emerge</c> command:
|
| 188 |
</p>
|
| 189 |
|
| 190 |
<pre caption="Download the sourcecode for gnumeric">
|
| 191 |
# <i>emerge --fetchonly gnumeric</i>
|
| 192 |
</pre>
|
| 193 |
|
| 194 |
</body>
|
| 195 |
</subsection>
|
| 196 |
<subsection>
|
| 197 |
<title>Finding Installed Package Documentation</title>
|
| 198 |
<body>
|
| 199 |
|
| 200 |
<p>
|
| 201 |
Many packages come with their own documentation. Sometimes, the <c>doc</c> USE
|
| 202 |
flag determines whether the package documentation should be installed or not.
|
| 203 |
You can check the existence of a <c>doc</c> USE flag with the <c>emerge -vp
|
| 204 |
<package name></c> command.
|
| 205 |
</p>
|
| 206 |
|
| 207 |
<pre caption="Checking the existence of a doc USE flag">
|
| 208 |
<comment>(alsa-lib is just an example, of course.)</comment>
|
| 209 |
# <i>emerge -vp alsa-lib</i>
|
| 210 |
[ebuild N ] media-libs/alsa-lib-1.0.14_rc1 -debug +doc 698 kB
|
| 211 |
</pre>
|
| 212 |
|
| 213 |
<p>
|
| 214 |
The best way of enabling the <c>doc</c> USE flag is doing it on a per-package
|
| 215 |
basis via <path>/etc/portage/package.use</path>, so that you get documentation
|
| 216 |
only for packages that you are interested in. Enabling this flag globally is
|
| 217 |
known to cause problems with circular dependencies. For more information, please
|
| 218 |
read the <uri link="?part=2&chap=2">USE Flags</uri> chapter.
|
| 219 |
</p>
|
| 220 |
|
| 221 |
<p>
|
| 222 |
Once the package installed, its documentation is generally found in a
|
| 223 |
subdirectory named after the package under the <path>/usr/share/doc</path>
|
| 224 |
directory. You can also list all installed files with the <c>equery</c> tool
|
| 225 |
which is part of the <c>app-portage/gentoolkit</c> <uri
|
| 226 |
link="/doc/en/gentoolkit.xml">package</uri>.
|
| 227 |
</p>
|
| 228 |
|
| 229 |
<pre caption="Locating package documentation">
|
| 230 |
# <i>ls -l /usr/share/doc/alsa-lib-1.0.14_rc1</i>
|
| 231 |
total 28
|
| 232 |
-rw-r--r-- 1 root root 669 May 17 21:54 ChangeLog.gz
|
| 233 |
-rw-r--r-- 1 root root 9373 May 17 21:54 COPYING.gz
|
| 234 |
drwxr-xr-x 2 root root 8560 May 17 21:54 html
|
| 235 |
-rw-r--r-- 1 root root 196 May 17 21:54 TODO.gz
|
| 236 |
|
| 237 |
<comment>(Alternatively, use equery to locate interesting files:)</comment>
|
| 238 |
# <i>equery files alsa-lib | less</i>
|
| 239 |
media-libs/alsa-lib-1.0.14_rc1
|
| 240 |
* Contents of media-libs/alsa-lib-1.0.14_rc1:
|
| 241 |
/usr
|
| 242 |
/usr/bin
|
| 243 |
/usr/bin/alsalisp
|
| 244 |
<comment>(Output truncated)</comment>
|
| 245 |
</pre>
|
| 246 |
|
| 247 |
</body>
|
| 248 |
</subsection>
|
| 249 |
<subsection>
|
| 250 |
<title>Removing Software</title>
|
| 251 |
<body>
|
| 252 |
|
| 253 |
<p>
|
| 254 |
When you want to remove a software package from your system, use <c>emerge
|
| 255 |
--unmerge</c>. This will tell Portage to remove all files installed by that
|
| 256 |
package from your system <e>except</e> the configuration files of that
|
| 257 |
application if you have altered those after the installation. Leaving the
|
| 258 |
configuration files allows you to continue working with the package if you ever
|
| 259 |
decide to install it again.
|
| 260 |
</p>
|
| 261 |
|
| 262 |
<p>
|
| 263 |
However, a <brite>big warning</brite> applies: Portage will <e>not</e> check if
|
| 264 |
the package you want to remove is required by another package. It will however
|
| 265 |
warn you when you want to remove an important package that breaks your system
|
| 266 |
if you unmerge it.
|
| 267 |
</p>
|
| 268 |
|
| 269 |
<pre caption="Removing gnumeric from the system">
|
| 270 |
# <i>emerge --unmerge gnumeric</i>
|
| 271 |
</pre>
|
| 272 |
|
| 273 |
<p>
|
| 274 |
When you remove a package from your system, the dependencies of that package
|
| 275 |
that were installed automatically when you installed the software are left. To
|
| 276 |
have Portage locate all dependencies that can now be removed, use
|
| 277 |
<c>emerge</c>'s <c>--depclean</c> functionality. We will talk about this later
|
| 278 |
on.
|
| 279 |
</p>
|
| 280 |
|
| 281 |
</body>
|
| 282 |
</subsection>
|
| 283 |
<subsection>
|
| 284 |
<title>Updating your System</title>
|
| 285 |
<body>
|
| 286 |
|
| 287 |
<p>
|
| 288 |
To keep your system in perfect shape (and not to mention install the latest
|
| 289 |
security updates) you need to update your system regularly. Since Portage only
|
| 290 |
checks the ebuilds in your Portage tree you first have to update your Portage
|
| 291 |
tree. When your Portage tree is updated, you can update your system with
|
| 292 |
<c>emerge --update world</c>. In the next example, we'll also use the
|
| 293 |
<c>--ask</c> switch which will tell Portage to display the list of packages it
|
| 294 |
wants to upgrade and ask you if you want to continue:
|
| 295 |
</p>
|
| 296 |
|
| 297 |
<pre caption="Updating your system">
|
| 298 |
# <i>emerge --update --ask world</i>
|
| 299 |
</pre>
|
| 300 |
|
| 301 |
<p>
|
| 302 |
Portage will then search for newer version of the applications you have
|
| 303 |
installed. However, it will only verify the versions for the applications you
|
| 304 |
have <e>explicitly</e> installed (the applications listed in
|
| 305 |
<path>/var/lib/portage/world</path>) - it does not thoroughly check their
|
| 306 |
dependencies. If you want to update the dependencies of those packages as well,
|
| 307 |
add the <c>--deep</c> argument:
|
| 308 |
</p>
|
| 309 |
|
| 310 |
<pre caption="Updating your system with dependencies">
|
| 311 |
# <i>emerge --update --deep world</i>
|
| 312 |
</pre>
|
| 313 |
|
| 314 |
<p>
|
| 315 |
Still, this doesn't mean <e>all packages</e>: some packages on your system are
|
| 316 |
needed during the compile and build process of packages, but once that package
|
| 317 |
is installed, these dependencies are no longer required. Portage calls those
|
| 318 |
<e>build dependencies</e>. To include those in an update cycle, add
|
| 319 |
<c>--with-bdeps=y</c>:
|
| 320 |
</p>
|
| 321 |
|
| 322 |
<pre caption="Updating your entire system">
|
| 323 |
# <i>emerge --update --deep --with-bdeps=y world</i>
|
| 324 |
</pre>
|
| 325 |
|
| 326 |
<p>
|
| 327 |
Since security updates also happen in packages you have not explicitly installed
|
| 328 |
on your system (but that are pulled in as dependencies of other programs), it
|
| 329 |
is recommended to run this command once in a while.
|
| 330 |
</p>
|
| 331 |
|
| 332 |
<p>
|
| 333 |
If you have altered any of your <uri link="?part=2&chap=2">USE flags</uri>
|
| 334 |
lately you might want to add <c>--newuse</c> as well. Portage will then verify
|
| 335 |
if the change requires the installation of new packages or recompilation of
|
| 336 |
existing ones:
|
| 337 |
</p>
|
| 338 |
|
| 339 |
<pre caption="Performing a full update">
|
| 340 |
# <i>emerge --update --deep --with-bdeps=y --newuse world</i>
|
| 341 |
</pre>
|
| 342 |
|
| 343 |
</body>
|
| 344 |
</subsection>
|
| 345 |
<subsection>
|
| 346 |
<title>Metapackages</title>
|
| 347 |
<body>
|
| 348 |
|
| 349 |
<p>
|
| 350 |
Some packages in the Portage tree don't have any real content but are used to
|
| 351 |
install a collection of packages. For instance, the <c>kde-meta</c> package will
|
| 352 |
install a complete KDE environment on your system by pulling in various
|
| 353 |
KDE-related packages as dependencies.
|
| 354 |
</p>
|
| 355 |
|
| 356 |
<p>
|
| 357 |
If you ever want to remove such a package from your system, running <c>emerge
|
| 358 |
--unmerge</c> on the package won't have much effect as the dependencies remain
|
| 359 |
on the system.
|
| 360 |
</p>
|
| 361 |
|
| 362 |
<p>
|
| 363 |
Portage has the functionality to remove orphaned dependencies as well, but since
|
| 364 |
the availability of software is dynamically dependent you first need to update
|
| 365 |
your entire system fully, including the new changes you applied when changing
|
| 366 |
USE flags. After this you can run <c>emerge --depclean</c> to remove the
|
| 367 |
orphaned dependencies. When this is done, you need to rebuild the applications
|
| 368 |
that were dynamically linked to the now-removed software titles but don't
|
| 369 |
require them anymore.
|
| 370 |
</p>
|
| 371 |
|
| 372 |
<p>
|
| 373 |
All this is handled with the following three commands:
|
| 374 |
</p>
|
| 375 |
|
| 376 |
<pre caption="Removing orphaned dependencies">
|
| 377 |
# <i>emerge --update --deep --newuse world</i>
|
| 378 |
# <i>emerge --depclean</i>
|
| 379 |
# <i>revdep-rebuild</i>
|
| 380 |
</pre>
|
| 381 |
|
| 382 |
<p>
|
| 383 |
<c>revdep-rebuild</c> is provided by the <c>gentoolkit</c> package; don't forget
|
| 384 |
to emerge it first:
|
| 385 |
</p>
|
| 386 |
|
| 387 |
<pre caption="Installing the gentoolkit package">
|
| 388 |
# <i>emerge gentoolkit</i>
|
| 389 |
</pre>
|
| 390 |
|
| 391 |
</body>
|
| 392 |
</subsection>
|
| 393 |
</section>
|
| 394 |
<section id="license">
|
| 395 |
<title>Licenses</title>
|
| 396 |
<subsection>
|
| 397 |
<body>
|
| 398 |
|
| 399 |
<p>
|
| 400 |
Beginning with Portage version 2.1.7, you can accept or reject software
|
| 401 |
installation based on its license. All packages in the tree contain a
|
| 402 |
<c>LICENSE</c> entry in their ebuilds. Running <c>emerge --search
|
| 403 |
packagename</c> will tell you the package's license.
|
| 404 |
</p>
|
| 405 |
|
| 406 |
<p>
|
| 407 |
By default, Portage permits all licenses, except End User License Agreements
|
| 408 |
(EULAs) that require reading and signing an acceptance agreement.
|
| 409 |
</p>
|
| 410 |
|
| 411 |
<p>
|
| 412 |
The variable that controls permitted licenses is <c>ACCEPT_LICENSE</c>, which
|
| 413 |
can be set in <path>/etc/portage/make.conf</path>:
|
| 414 |
</p>
|
| 415 |
|
| 416 |
<pre caption="Default ACCEPT_LICENSE in /etc/portage/make.conf">
|
| 417 |
ACCEPT_LICENSE="* -@EULA"
|
| 418 |
</pre>
|
| 419 |
|
| 420 |
<p>
|
| 421 |
With this configuration, packages that require interaction during installation
|
| 422 |
to approve their EULA <e>will not</e> be installed. Packages without an EULA
|
| 423 |
<e>will</e> be installed.
|
| 424 |
</p>
|
| 425 |
|
| 426 |
<p>
|
| 427 |
You can set <c>ACCEPT_LICENSE</c> globally in <path>/etc/portage/make.conf</path>
|
| 428 |
, or you can specify it on a per-package basis in
|
| 429 |
<path>/etc/portage/package.license</path>.
|
| 430 |
</p>
|
| 431 |
|
| 432 |
<p>
|
| 433 |
For example, if you want to allow the <c>truecrypt-2.7</c> license for
|
| 434 |
<c>app-crypt/truecrypt</c>, add the following to
|
| 435 |
<path>/etc/portage/package.license</path>:
|
| 436 |
</p>
|
| 437 |
|
| 438 |
<pre caption="Specifying a truecrypt license in package.license">
|
| 439 |
app-crypt/truecrypt truecrypt-2.7
|
| 440 |
</pre>
|
| 441 |
|
| 442 |
<p>
|
| 443 |
This permits installation of truecrypt versions that have the
|
| 444 |
<c>truecrypt-2.7</c> license, but not versions with the <c>truecrypt-2.8</c>
|
| 445 |
license.
|
| 446 |
</p>
|
| 447 |
|
| 448 |
<impo>
|
| 449 |
Licenses are stored in <path>/usr/portage/licenses</path>, and license groups
|
| 450 |
are kept in <path>/usr/portage/profiles/license_groups</path>. The first entry
|
| 451 |
of each line in CAPITAL letters is the name of the license group, and every
|
| 452 |
entry after that is an individual license.
|
| 453 |
</impo>
|
| 454 |
|
| 455 |
<p>
|
| 456 |
License groups defined in <c>ACCEPT_LICENSE</c> are prefixed with an <b>@</b>
|
| 457 |
sign. Here's an example of a system that globally permits the GPL-compatible
|
| 458 |
license group, as well as a few other groups and individual licenses:
|
| 459 |
</p>
|
| 460 |
|
| 461 |
<pre caption="ACCEPT_LICENSE in /etc/portage/make.conf">
|
| 462 |
ACCEPT_LICENSE="@GPL-COMPATIBLE @OSI-APPROVED @EULA atheros-hal BitstreamVera"
|
| 463 |
</pre>
|
| 464 |
|
| 465 |
<p>
|
| 466 |
If you want only free software and documentation on your system, you might use
|
| 467 |
the following setup:
|
| 468 |
</p>
|
| 469 |
|
| 470 |
<pre caption="Use only free licenses">
|
| 471 |
ACCEPT_LICENSE="-* @FREE"
|
| 472 |
</pre>
|
| 473 |
|
| 474 |
<p>
|
| 475 |
In this case, "free" is mostly defined by the <uri
|
| 476 |
link="http://www.gnu.org/philosophy/free-sw.html">FSF</uri> and <uri
|
| 477 |
link="http://www.opensource.org/docs/osd">OSI</uri>. Any package whose license
|
| 478 |
does not meet these requirements will not be installed on your system.
|
| 479 |
</p>
|
| 480 |
|
| 481 |
</body>
|
| 482 |
</subsection>
|
| 483 |
</section>
|
| 484 |
<section>
|
| 485 |
<title>When Portage is Complaining...</title>
|
| 486 |
<subsection>
|
| 487 |
<title>About SLOTs, Virtuals, Branches, Architectures and Profiles</title>
|
| 488 |
<body>
|
| 489 |
|
| 490 |
<p>
|
| 491 |
As we stated before, Portage is extremely powerful and supports many features
|
| 492 |
that other software management tools lack. To understand this, we explain a few
|
| 493 |
aspects of Portage without going into too much detail.
|
| 494 |
</p>
|
| 495 |
|
| 496 |
<p>
|
| 497 |
With Portage different versions of a single package can coexist on a system.
|
| 498 |
While other distributions tend to name their package to those versions (like
|
| 499 |
<c>freetype</c> and <c>freetype2</c>) Portage uses a technology called
|
| 500 |
<e>SLOT</e>s. An ebuild declares a certain SLOT for its version. Ebuilds with
|
| 501 |
different SLOTs can coexist on the same system. For instance, the
|
| 502 |
<c>freetype</c> package has ebuilds with <c>SLOT="1"</c> and <c>SLOT="2"</c>.
|
| 503 |
</p>
|
| 504 |
|
| 505 |
<p>
|
| 506 |
There are also packages that provide the same functionality but are implemented
|
| 507 |
differently. For instance, <c>metalogd</c>, <c>sysklogd</c> and <c>syslog-ng</c>
|
| 508 |
are all system loggers. Applications that rely on the availability of "a system
|
| 509 |
logger" cannot depend on, for instance, <c>metalogd</c>, as the other system
|
| 510 |
loggers are as good a choice as any. Portage allows for <e>virtuals</e>: each
|
| 511 |
system logger is listed as an "exclusive" dependency of the logging service in the
|
| 512 |
<c>logger</c> virtual package of the <c>virtual</c> category, so that
|
| 513 |
applications can depend on the <c>virtual/logger</c> package. When installed,
|
| 514 |
the package will pull in the first logging package mentioned in the package,
|
| 515 |
unless a logging package was already installed (in which case the virtual is
|
| 516 |
satisfied).
|
| 517 |
</p>
|
| 518 |
|
| 519 |
<p>
|
| 520 |
Software in the Portage tree can reside in different branches. By default your
|
| 521 |
system only accepts packages that Gentoo deems stable. Most new software titles,
|
| 522 |
when committed, are added to the testing branch, meaning more testing needs to
|
| 523 |
be done before it is marked as stable. Although you will see the ebuilds for
|
| 524 |
those software in the Portage tree, Portage will not update them before they are
|
| 525 |
placed in the stable branch.
|
| 526 |
</p>
|
| 527 |
|
| 528 |
<p>
|
| 529 |
Some software is only available for a few architectures. Or the software doesn't
|
| 530 |
work on the other architectures, or it needs more testing, or the developer that
|
| 531 |
committed the software to the Portage tree is unable to verify if the package
|
| 532 |
works on different architectures.
|
| 533 |
</p>
|
| 534 |
|
| 535 |
<p>
|
| 536 |
Each Gentoo installation adheres to a certain <c>profile</c> which contains,
|
| 537 |
amongst other information, the list of packages that are required for a system
|
| 538 |
to function normally.
|
| 539 |
</p>
|
| 540 |
|
| 541 |
</body>
|
| 542 |
</subsection>
|
| 543 |
<subsection id="blocked">
|
| 544 |
<title>Blocked Packages</title>
|
| 545 |
<body>
|
| 546 |
|
| 547 |
<pre caption="Portage warning about blocked packages (with --pretend)">
|
| 548 |
[blocks B ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1)
|
| 549 |
</pre>
|
| 550 |
|
| 551 |
<pre caption="Portage warning about blocked packages (without --pretend)">
|
| 552 |
!!! Error: the mail-mta/postfix package conflicts with another package.
|
| 553 |
!!! both can't be installed on the same system together.
|
| 554 |
!!! Please use 'emerge --pretend' to determine blockers.
|
| 555 |
</pre>
|
| 556 |
|
| 557 |
<p>
|
| 558 |
Ebuilds contain specific fields that inform Portage about its dependencies.
|
| 559 |
There are two possible dependencies: build dependencies, declared in
|
| 560 |
<c>DEPEND</c> and run-time dependencies, declared in <c>RDEPEND</c>. When one of
|
| 561 |
these dependencies explicitly marks a package or virtual as being <e>not</e>
|
| 562 |
compatible, it triggers a blockage.
|
| 563 |
</p>
|
| 564 |
|
| 565 |
<p>
|
| 566 |
While recent versions of Portage are smart enough to work around minor blockages
|
| 567 |
without user intervention, occasionally you will need to fix it yourself, as
|
| 568 |
explained below.
|
| 569 |
</p>
|
| 570 |
|
| 571 |
<p>
|
| 572 |
To fix a blockage, you can choose to not install the package or unmerge the
|
| 573 |
conflicting package first. In the given example, you can opt not to install
|
| 574 |
<c>postfix</c> or to remove <c>ssmtp</c> first.
|
| 575 |
</p>
|
| 576 |
|
| 577 |
<p>
|
| 578 |
You may also see blocking packages with specific atoms, such as
|
| 579 |
<b><</b>media-video/mplayer-1.0_rc1-r2. In this case, updating to a more
|
| 580 |
recent version of the blocking package would remove the block.
|
| 581 |
</p>
|
| 582 |
|
| 583 |
<p>
|
| 584 |
It is also possible that two packages that are yet to be installed are blocking
|
| 585 |
each other. In this rare case, you should find out why you need to install both.
|
| 586 |
In most cases you can do with one of the packages alone. If not, please file a
|
| 587 |
bug on <uri link="http://bugs.gentoo.org">Gentoo's bugtracking system</uri>.
|
| 588 |
</p>
|
| 589 |
|
| 590 |
</body>
|
| 591 |
</subsection>
|
| 592 |
<subsection id="masked">
|
| 593 |
<title>Masked Packages</title>
|
| 594 |
<body>
|
| 595 |
|
| 596 |
<pre caption="Portage warning about masked packages">
|
| 597 |
!!! all ebuilds that could satisfy "bootsplash" have been masked.
|
| 598 |
</pre>
|
| 599 |
|
| 600 |
<pre caption="Portage warning about masked packages - reason">
|
| 601 |
!!! possible candidates are:
|
| 602 |
|
| 603 |
- gnome-base/gnome-2.8.0_pre1 (masked by: <i>~x86 keyword</i>)
|
| 604 |
- lm-sensors/lm-sensors-2.8.7 (masked by: <i>-sparc keyword</i>)
|
| 605 |
- sys-libs/glibc-2.3.4.20040808 (masked by: <i>-* keyword</i>)
|
| 606 |
- dev-util/cvsd-1.0.2 (masked by: <i>missing keyword</i>)
|
| 607 |
- games-fps/unreal-tournament-451 (masked by: <i>package.mask</i>)
|
| 608 |
- sys-libs/glibc-2.3.2-r11 (masked by: <i>profile</i>)
|
| 609 |
- net-im/skype-2.1.0.81 (masked by: skype-eula <i>license</i>(s))
|
| 610 |
</pre>
|
| 611 |
|
| 612 |
<p>
|
| 613 |
When you want to install a package that isn't available for your system, you
|
| 614 |
will receive this masking error. You should try installing a different
|
| 615 |
application that is available for your system or wait until the package is put
|
| 616 |
available. There is always a reason why a package is masked:
|
| 617 |
</p>
|
| 618 |
|
| 619 |
<ul>
|
| 620 |
<li>
|
| 621 |
<b>~arch keyword</b> means that the application is not tested sufficiently
|
| 622 |
to be put in the stable branch. Wait a few days or weeks and try again.
|
| 623 |
</li>
|
| 624 |
<li>
|
| 625 |
<b>-arch keyword</b> or <b>-* keyword</b> means that the application does
|
| 626 |
not work on your architecture. If you believe the package does work file
|
| 627 |
a bug at our <uri link="http://bugs.gentoo.org">bugzilla</uri> website.
|
| 628 |
</li>
|
| 629 |
<li>
|
| 630 |
<b>missing keyword</b> means that the application has not been tested on
|
| 631 |
your architecture yet. Ask the architecture porting team to test the package
|
| 632 |
or test it for them and report your findings on our <uri
|
| 633 |
link="http://bugs.gentoo.org">bugzilla</uri> website.
|
| 634 |
</li>
|
| 635 |
<li>
|
| 636 |
<b>package.mask</b> means that the package has been found corrupt, unstable
|
| 637 |
or worse and has been deliberately marked as do-not-use.
|
| 638 |
</li>
|
| 639 |
<li>
|
| 640 |
<b>profile</b> means that the package has been found not suitable for your
|
| 641 |
profile. The application might break your system if you installed it or is
|
| 642 |
just not compatible with the profile you use.
|
| 643 |
</li>
|
| 644 |
<li>
|
| 645 |
<b>license</b> means that the package's license is not compatible with your
|
| 646 |
<c>ACCEPT_LICENSE</c> setting. You must explicitly permit its license or
|
| 647 |
license group by setting it in <path>/etc/portage/make.conf</path> or in
|
| 648 |
<path>/etc/portage/package.license</path>. Refer to <uri
|
| 649 |
link="#license">Licenses</uri> to learn how licenses work.
|
| 650 |
</li>
|
| 651 |
</ul>
|
| 652 |
|
| 653 |
</body>
|
| 654 |
</subsection>
|
| 655 |
<subsection id="USEdependency">
|
| 656 |
<title>Necessary USE Flag Changes</title>
|
| 657 |
<body>
|
| 658 |
|
| 659 |
<pre caption="Portage warning about USE flag change requirement">
|
| 660 |
The following USE changes are necessary to proceed:
|
| 661 |
#required by app-text/happypackage-2.0, required by happypackage (argument)
|
| 662 |
>=app-text/feelings-1.0.0 test
|
| 663 |
</pre>
|
| 664 |
|
| 665 |
<p>
|
| 666 |
The error message might also be displayed as follows, if <c>--autounmask</c>
|
| 667 |
isn't set:
|
| 668 |
</p>
|
| 669 |
|
| 670 |
<pre caption="Portage error about USE flag change requirement">
|
| 671 |
emerge: there are no ebuilds built with USE flags to satisfy "app-text/feelings[test]".
|
| 672 |
!!! One of the following packages is required to complete your request:
|
| 673 |
- app-text/feelings-1.0.0 (Change USE: +test)
|
| 674 |
(dependency required by "app-text/happypackage-2.0" [ebuild])
|
| 675 |
(dependency required by "happypackage" [argument])
|
| 676 |
</pre>
|
| 677 |
|
| 678 |
<p>
|
| 679 |
Such warning or error occurs when you want to install a package which not only
|
| 680 |
depends on another package, but also requires that that package is built with a
|
| 681 |
particular USE flag (or set of USE flags). In the given example, the package
|
| 682 |
<c>app-text/feelings</c> needs to be built with <c>USE="test"</c>, but this USE
|
| 683 |
flag is not set on the system.
|
| 684 |
</p>
|
| 685 |
|
| 686 |
<p>
|
| 687 |
To resolve this, either add the requested USE flag to your global USE flags in
|
| 688 |
<path>/etc/portage/make.conf</path>, or set it for the specific package in
|
| 689 |
<path>/etc/portage/package.use</path>.
|
| 690 |
</p>
|
| 691 |
|
| 692 |
</body>
|
| 693 |
</subsection>
|
| 694 |
<subsection id="missingdependencies">
|
| 695 |
<title>Missing Dependencies</title>
|
| 696 |
<body>
|
| 697 |
|
| 698 |
<pre caption="Portage warning about missing dependency">
|
| 699 |
emerge: there are no ebuilds to satisfy ">=sys-devel/gcc-3.4.2-r4".
|
| 700 |
|
| 701 |
!!! Problem with ebuild sys-devel/gcc-3.4.2-r2
|
| 702 |
!!! Possibly a DEPEND/*DEPEND problem.
|
| 703 |
</pre>
|
| 704 |
|
| 705 |
<p>
|
| 706 |
The application you are trying to install depends on another package that is not
|
| 707 |
available for your system. Please check <uri
|
| 708 |
link="http://bugs.gentoo.org">bugzilla</uri> if the issue is known and if not,
|
| 709 |
please report it. Unless you are mixing branches this should not occur and is
|
| 710 |
therefore a bug.
|
| 711 |
</p>
|
| 712 |
|
| 713 |
</body>
|
| 714 |
</subsection>
|
| 715 |
<subsection id="ambiguousebuild">
|
| 716 |
<title>Ambiguous Ebuild Name</title>
|
| 717 |
<body>
|
| 718 |
|
| 719 |
<pre caption="Portage warning about ambiguous ebuild names">
|
| 720 |
[ Results for search key : listen ]
|
| 721 |
[ Applications found : 2 ]
|
| 722 |
|
| 723 |
* dev-tinyos/listen [ Masked ]
|
| 724 |
Latest version available: 1.1.15
|
| 725 |
Latest version installed: [ Not Installed ]
|
| 726 |
Size of files: 10,032 kB
|
| 727 |
Homepage: http://www.tinyos.net/
|
| 728 |
Description: Raw listen for TinyOS
|
| 729 |
License: BSD
|
| 730 |
|
| 731 |
* media-sound/listen [ Masked ]
|
| 732 |
Latest version available: 0.6.3
|
| 733 |
Latest version installed: [ Not Installed ]
|
| 734 |
Size of files: 859 kB
|
| 735 |
Homepage: http://www.listen-project.org
|
| 736 |
Description: A Music player and management for GNOME
|
| 737 |
License: GPL-2
|
| 738 |
|
| 739 |
!!! The short ebuild name "listen" is ambiguous. Please specify
|
| 740 |
!!! one of the above fully-qualified ebuild names instead.
|
| 741 |
</pre>
|
| 742 |
|
| 743 |
<p>
|
| 744 |
The application you want to install has a name that corresponds with more than
|
| 745 |
one package. You need to supply the category name as well. Portage will inform
|
| 746 |
you of possible matches to choose from.
|
| 747 |
</p>
|
| 748 |
|
| 749 |
</body>
|
| 750 |
</subsection>
|
| 751 |
<subsection id="circulardependencies">
|
| 752 |
<title>Circular Dependencies</title>
|
| 753 |
<body>
|
| 754 |
|
| 755 |
<pre caption="Portage warning about circular dependencies">
|
| 756 |
!!! Error: circular dependencies:
|
| 757 |
|
| 758 |
ebuild / net-print/cups-1.1.15-r2 depends on ebuild / app-text/ghostscript-7.05.3-r1
|
| 759 |
ebuild / app-text/ghostscript-7.05.3-r1 depends on ebuild / net-print/cups-1.1.15-r2
|
| 760 |
</pre>
|
| 761 |
|
| 762 |
<p>
|
| 763 |
Two (or more) packages you want to install depend on each other and can
|
| 764 |
therefore not be installed. This is most likely a bug in the Portage tree.
|
| 765 |
Please resync after a while and try again. You can also check <uri
|
| 766 |
link="http://bugs.gentoo.org">bugzilla</uri> if the issue is known and if not,
|
| 767 |
report it.
|
| 768 |
</p>
|
| 769 |
|
| 770 |
</body>
|
| 771 |
</subsection>
|
| 772 |
<subsection id="fetchfailed">
|
| 773 |
<title>Fetch failed</title>
|
| 774 |
<body>
|
| 775 |
|
| 776 |
<pre caption="Portage warning about fetch failed">
|
| 777 |
!!! Fetch failed for sys-libs/ncurses-5.4-r5, continuing...
|
| 778 |
<comment>(...)</comment>
|
| 779 |
!!! Some fetch errors were encountered. Please see above for details.
|
| 780 |
</pre>
|
| 781 |
|
| 782 |
<p>
|
| 783 |
Portage was unable to download the sources for the given application and will
|
| 784 |
try to continue installing the other applications (if applicable). This failure
|
| 785 |
can be due to a mirror that has not synchronised correctly or because the ebuild
|
| 786 |
points to an incorrect location. The server where the sources reside can also be
|
| 787 |
down for some reason.
|
| 788 |
</p>
|
| 789 |
|
| 790 |
<p>
|
| 791 |
Retry after one hour to see if the issue still persists.
|
| 792 |
</p>
|
| 793 |
|
| 794 |
</body>
|
| 795 |
</subsection>
|
| 796 |
<subsection id="profileprotect">
|
| 797 |
<title>System Profile Protection</title>
|
| 798 |
<body>
|
| 799 |
|
| 800 |
<pre caption="Portage warning about profile-protected package">
|
| 801 |
!!! Trying to unmerge package(s) in system profile. 'sys-apps/portage'
|
| 802 |
!!! This could be damaging to your system.
|
| 803 |
</pre>
|
| 804 |
|
| 805 |
<p>
|
| 806 |
You have asked to remove a package that is part of your system's core packages.
|
| 807 |
It is listed in your profile as required and should therefore not be removed
|
| 808 |
from the system.
|
| 809 |
</p>
|
| 810 |
|
| 811 |
</body>
|
| 812 |
</subsection>
|
| 813 |
<subsection id="digesterror">
|
| 814 |
<title>Digest Verification Failures</title>
|
| 815 |
<body>
|
| 816 |
|
| 817 |
<p>
|
| 818 |
Sometimes, when you attempt to emerge a package, it will fail with the message:
|
| 819 |
</p>
|
| 820 |
|
| 821 |
<pre caption="Digest verification failure">
|
| 822 |
>>> checking ebuild checksums
|
| 823 |
!!! Digest verification failed:
|
| 824 |
</pre>
|
| 825 |
|
| 826 |
<p>
|
| 827 |
This is a sign that something is wrong with the Portage tree -- often, it is
|
| 828 |
because a developer may have made a mistake when committing a package to the
|
| 829 |
tree.
|
| 830 |
</p>
|
| 831 |
|
| 832 |
<p>
|
| 833 |
When the digest verification fails, do <e>not</e> try to re-digest the package
|
| 834 |
yourself. Running <c>ebuild foo manifest</c> will not fix the problem; it will
|
| 835 |
almost certainly make it worse!
|
| 836 |
</p>
|
| 837 |
|
| 838 |
<p>
|
| 839 |
Instead, wait an hour or two for the tree to settle down. It's likely that the
|
| 840 |
error was noticed right away, but it can take a little time for the fix to
|
| 841 |
trickle down the Portage tree. While you're waiting, check <uri
|
| 842 |
link="http://bugs.gentoo.org">Bugzilla</uri> and see if anyone has reported
|
| 843 |
the problem yet. If not, go ahead and file a bug for the broken package.
|
| 844 |
</p>
|
| 845 |
|
| 846 |
<p>
|
| 847 |
Once you see that the bug has been fixed, you may want to re-sync to pick up
|
| 848 |
the fixed digest.
|
| 849 |
</p>
|
| 850 |
|
| 851 |
<impo>
|
| 852 |
This does <e>not</e> mean that you can re-sync your tree multiple times! As
|
| 853 |
stated in the rsync policy (when you run <c>emerge --sync</c>), users who sync
|
| 854 |
too often will be banned! In fact, it's better to just wait until your next
|
| 855 |
scheduled sync, so that you don't overload the rsync servers.
|
| 856 |
</impo>
|
| 857 |
|
| 858 |
</body>
|
| 859 |
</subsection>
|
| 860 |
</section>
|
| 861 |
</sections>
|