| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- 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 --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.51 2005/05/17 14:39:26 neysx Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.63 2007/03/25 23:58:47 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
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 | |
| 11 | <version>1.46</version> |
16 | <version>1.57</version> |
| 12 | <date>2005-05-17</date> |
17 | <date>2007-03-25</date> |
| 13 | |
18 | |
| 14 | <section> |
19 | <section> |
| 15 | <title>Welcome to Portage</title> |
20 | <title>Welcome to Portage</title> |
| 16 | <body> |
21 | <body> |
| 17 | |
22 | |
| … | |
… | |
| 178 | </pre> |
183 | </pre> |
| 179 | |
184 | |
| 180 | </body> |
185 | </body> |
| 181 | </subsection> |
186 | </subsection> |
| 182 | <subsection> |
187 | <subsection> |
|
|
188 | <title>Finding Installed Package Documentation</title> |
|
|
189 | <body> |
|
|
190 | |
|
|
191 | <p> |
|
|
192 | Many packages come with their own documentation. Sometimes, the <c>doc</c> USE |
|
|
193 | flag determines whether the package documentation should be installed or not. |
|
|
194 | You can check the existence of a <c>doc</c> USE flag with the <c>emerge -vp |
|
|
195 | <package name></c> command. |
|
|
196 | </p> |
|
|
197 | |
|
|
198 | <pre caption="Checking the existence of a doc USE flag"> |
|
|
199 | <comment>(alsa-lib is just an example, of course.)</comment> |
|
|
200 | # <i>emerge -vp alsa-lib</i> |
|
|
201 | [ebuild N ] media-libs/alsa-lib-1.0.14_rc1 -debug +doc 698 kB |
|
|
202 | </pre> |
|
|
203 | |
|
|
204 | <p> |
|
|
205 | You can enable or disable the <c>doc</c> USE flag either globally in the |
|
|
206 | <path>/etc/make.conf</path> file or per package in the |
|
|
207 | <path>/etc/portage/package.use</path> file. The <uri |
|
|
208 | link="?part=2&chap=2">USE Flags</uri> chapter covers this aspect in detail. |
|
|
209 | </p> |
|
|
210 | |
|
|
211 | <p> |
|
|
212 | Once the package installed, its documentation is generally found in a |
|
|
213 | subdirectory named after the package under the <path>/usr/share/doc</path> |
|
|
214 | directory. You can also list all installed files with the <c>equery</c> tool |
|
|
215 | which is part of the <c>app-portage/gentoolkit</c> <uri |
|
|
216 | link="/doc/en/gentoolkit.xml">package</uri>. |
|
|
217 | </p> |
|
|
218 | |
|
|
219 | <pre caption="Locating package documentation"> |
|
|
220 | # <i>ls -l /usr/share/doc/alsa-lib-1.0.14_rc1</i> |
|
|
221 | total 28 |
|
|
222 | -rw-r--r-- 1 root root 669 May 17 21:54 ChangeLog.gz |
|
|
223 | -rw-r--r-- 1 root root 9373 May 17 21:54 COPYING.gz |
|
|
224 | drwxr-xr-x 2 root root 8560 May 17 21:54 html |
|
|
225 | -rw-r--r-- 1 root root 196 May 17 21:54 TODO.gz |
|
|
226 | |
|
|
227 | <comment>(Alternatively, use equery to locate interesting files:)</comment> |
|
|
228 | # <i>equery files alsa-lib | less</i> |
|
|
229 | media-libs/alsa-lib-1.0.14_rc1 |
|
|
230 | * Contents of media-libs/alsa-lib-1.0.14_rc1: |
|
|
231 | /usr |
|
|
232 | /usr/bin |
|
|
233 | /usr/bin/alsalisp |
|
|
234 | <comment>(Output truncated)</comment> |
|
|
235 | </pre> |
|
|
236 | |
|
|
237 | </body> |
|
|
238 | </subsection> |
|
|
239 | <subsection> |
| 183 | <title>Removing Software</title> |
240 | <title>Removing Software</title> |
| 184 | <body> |
241 | <body> |
| 185 | |
242 | |
| 186 | <p> |
243 | <p> |
| 187 | When you want to remove a software package from your system, use <c>emerge |
244 | When you want to remove a software package from your system, use <c>emerge |
| … | |
… | |
| 220 | <p> |
277 | <p> |
| 221 | To keep your system in perfect shape (and not to mention install the latest |
278 | To keep your system in perfect shape (and not to mention install the latest |
| 222 | security updates) you need to update your system regularly. Since Portage only |
279 | security updates) you need to update your system regularly. Since Portage only |
| 223 | checks the ebuilds in your Portage tree you first have to update your Portage |
280 | checks the ebuilds in your Portage tree you first have to update your Portage |
| 224 | tree. When your Portage tree is updated, you can update your system with |
281 | tree. When your Portage tree is updated, you can update your system with |
| 225 | <c>emerge --update world</c>: |
282 | <c>emerge --update world</c>. In the next example, we'll also use the |
|
|
283 | <c>--ask</c> switch which will tell Portage to display the list of packages it |
|
|
284 | wants to upgrade and ask you if you want to continue: |
| 226 | </p> |
285 | </p> |
| 227 | |
286 | |
| 228 | <pre caption="Updating your system"> |
287 | <pre caption="Updating your system"> |
| 229 | # <i>emerge --update world</i> |
288 | # <i>emerge --update --ask world</i> |
| 230 | </pre> |
289 | </pre> |
| 231 | |
290 | |
| 232 | <p> |
291 | <p> |
| 233 | Portage will then search for newer version of the applications you have |
292 | Portage will then search for newer version of the applications you have |
| 234 | installed. However, it will only verify the versions for the applications you |
293 | installed. However, it will only verify the versions for the applications you |
| 235 | have explicitly installed - not the dependencies. If you want to update every |
294 | have <e>explicitly</e> installed (the applications listed in |
| 236 | single package on your system, add the <c>--deep</c> argument: |
295 | <path>/var/lib/portage/world</path>) - it does not thoroughly check their |
|
|
296 | dependencies. If you want to update <e>every single package</e> on your system, |
|
|
297 | add the <c>--deep</c> argument: |
| 237 | </p> |
298 | </p> |
| 238 | |
299 | |
| 239 | <pre caption="Updating your entire system"> |
300 | <pre caption="Updating your entire system"> |
| 240 | # <i>emerge --update --deep world</i> |
301 | # <i>emerge --update --deep world</i> |
| 241 | </pre> |
302 | </pre> |
|
|
303 | |
|
|
304 | <p> |
|
|
305 | Since security updates also happen in packages you have not explicitly installed |
|
|
306 | on your system (but that are pulled in as dependencies of other programs), it |
|
|
307 | is recommended to run this command once in a while. |
|
|
308 | </p> |
| 242 | |
309 | |
| 243 | <p> |
310 | <p> |
| 244 | If you have altered any of your <uri link="?part=2&chap=2">USE flags</uri> |
311 | If you have altered any of your <uri link="?part=2&chap=2">USE flags</uri> |
| 245 | lately you might want to add <c>--newuse</c> as well. Portage will then verify |
312 | lately you might want to add <c>--newuse</c> as well. Portage will then verify |
| 246 | if the change requires the installation of new packages or recompilation of |
313 | if the change requires the installation of new packages or recompilation of |
| … | |
… | |
| 360 | <subsection id="blocked"> |
427 | <subsection id="blocked"> |
| 361 | <title>Blocked Packages</title> |
428 | <title>Blocked Packages</title> |
| 362 | <body> |
429 | <body> |
| 363 | |
430 | |
| 364 | <pre caption="Portage warning about blocked packages (with --pretend)"> |
431 | <pre caption="Portage warning about blocked packages (with --pretend)"> |
| 365 | [blocks B ] gnome-base/bonobo-activation (from pkg gnome-base/libbonobo-2.4.0) |
432 | [blocks B ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1) |
| 366 | </pre> |
433 | </pre> |
| 367 | |
434 | |
| 368 | <pre caption="Portage warning about blocked packages (without --pretend)"> |
435 | <pre caption="Portage warning about blocked packages (without --pretend)"> |
| 369 | !!! Error: the gnome-base/bonobo-activation package conflicts with another package. |
436 | !!! Error: the mail-mta/postfix package conflicts with another package. |
| 370 | !!! both can't be installed on the same system together. |
437 | !!! both can't be installed on the same system together. |
| 371 | !!! Please use 'emerge --pretend' to determine blockers. |
438 | !!! Please use 'emerge --pretend' to determine blockers. |
| 372 | </pre> |
439 | </pre> |
| 373 | |
440 | |
| 374 | <p> |
441 | <p> |
| … | |
… | |
| 380 | </p> |
447 | </p> |
| 381 | |
448 | |
| 382 | <p> |
449 | <p> |
| 383 | To fix a blockage, you can choose to not install the package or unmerge the |
450 | To fix a blockage, you can choose to not install the package or unmerge the |
| 384 | conflicting package first. In the given example, you can opt not to install |
451 | conflicting package first. In the given example, you can opt not to install |
| 385 | <c>libbonobo</c> or to remove <c>bonobo-activation</c> first. |
452 | <c>postfix</c> or to remove <c>ssmtp</c> first. |
|
|
453 | </p> |
|
|
454 | |
|
|
455 | <p> |
|
|
456 | You may also see blocking packages with specific atoms, such as |
|
|
457 | <b><</b>media-video/mplayer-bin-1.0_rc1-r2. In this case, updating to a more |
|
|
458 | recent version of the blocking package would remove the block. |
|
|
459 | </p> |
|
|
460 | |
|
|
461 | <p> |
|
|
462 | It is also possible that two packages that are yet to be installed are blocking |
|
|
463 | each other. In this rare case, you should find out why you need to install both. |
|
|
464 | In most cases you can do with one of the packages alone. If not, please file a |
|
|
465 | bug on <uri link="http://bugs.gentoo.org">Gentoo's bugtracking system</uri>. |
| 386 | </p> |
466 | </p> |
| 387 | |
467 | |
| 388 | </body> |
468 | </body> |
| 389 | </subsection> |
469 | </subsection> |
| 390 | <subsection id="masked"> |
470 | <subsection id="masked"> |
| … | |
… | |
| 543 | from the system. |
623 | from the system. |
| 544 | </p> |
624 | </p> |
| 545 | |
625 | |
| 546 | </body> |
626 | </body> |
| 547 | </subsection> |
627 | </subsection> |
|
|
628 | <subsection id="digesterror"> |
|
|
629 | <title>Digest Verification Failures</title> |
|
|
630 | <body> |
|
|
631 | |
|
|
632 | <p> |
|
|
633 | Sometimes, when you attempt to emerge a package, it will fail with the message: |
|
|
634 | </p> |
|
|
635 | |
|
|
636 | <pre caption="Digest verification failure"> |
|
|
637 | >>> checking ebuild checksums |
|
|
638 | !!! Digest verification failed: |
|
|
639 | </pre> |
|
|
640 | |
|
|
641 | <p> |
|
|
642 | This is a sign that something is wrong with the Portage tree -- often, it is |
|
|
643 | because a developer may have made a mistake when committing a package to the |
|
|
644 | tree. |
|
|
645 | </p> |
|
|
646 | |
|
|
647 | <p> |
|
|
648 | When the digest verification fails, do <e>not</e> try to re-digest the package |
|
|
649 | yourself. Running <c>ebuild foo digest</c> will not fix the problem; it will |
|
|
650 | almost certainly make it worse! |
|
|
651 | </p> |
|
|
652 | |
|
|
653 | <p> |
|
|
654 | Instead, wait an hour or two for the tree to settle down. It's likely that the |
|
|
655 | error was noticed right away, but it can take a little time for the fix to |
|
|
656 | trickle down the Portage tree. While you're waiting, check <uri |
|
|
657 | link="http://bugs.gentoo.org">Bugzilla</uri> and see if anyone has reported |
|
|
658 | the problem yet. If not, go ahead and file a bug for the broken package. |
|
|
659 | </p> |
|
|
660 | |
|
|
661 | <p> |
|
|
662 | Once you see that the bug has been fixed, you may want to re-sync to pick up |
|
|
663 | the fixed digest. |
|
|
664 | </p> |
|
|
665 | |
|
|
666 | <impo> |
|
|
667 | This does <e>not</e> mean that you can re-sync your tree multiple times! As |
|
|
668 | stated in the rsync policy (when you run <c>emerge --sync</c>), users who sync |
|
|
669 | too often will be banned! In fact, it's better to just wait until your next |
|
|
670 | scheduled sync, so that you don't overload the rsync servers. |
|
|
671 | </impo> |
|
|
672 | |
|
|
673 | </body> |
|
|
674 | </subsection> |
| 548 | </section> |
675 | </section> |
| 549 | </sections> |
676 | </sections> |