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