| … | |
… | |
| 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/1.0 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.35 2004/08/29 10:56:31 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.36 2004/08/30 17:44:00 neysx Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | <section> |
10 | <section> |
| 11 | <title>Obtaining Package Information</title> |
11 | <title>Obtaining Package Information</title> |
| 12 | <subsection> |
12 | <subsection> |
| … | |
… | |
| 221 | </pre> |
221 | </pre> |
| 222 | |
222 | |
| 223 | <p> |
223 | <p> |
| 224 | As you can see, the output of <c>emerge</c> informs you about the category and |
224 | As you can see, the output of <c>emerge</c> informs you about the category and |
| 225 | name of the package, the available version, the currently installed version, |
225 | name of the package, the available version, the currently installed version, |
| 226 | the size of the downloaded files, the homepage and the small description. |
226 | the size of the downloaded files, the homepage and the short description. |
| 227 | </p> |
|
|
| 228 | |
|
|
| 229 | <p> |
227 | </p> |
|
|
228 | |
|
|
229 | <p> |
| 230 | You see something new? Yes, <e>downloaded files</e>. When you tell Portage to |
230 | Do you see something else? Yes, <e>downloaded files</e>. When you tell Portage |
| 231 | install a package, it of course needs to have the necessary sources (or |
231 | to install a package, it of course needs to have the necessary sources (or |
| 232 | precompiled packages) available. It therefore checks the contents of |
232 | precompiled packages) available. It therefore checks the contents of |
| 233 | <path>/usr/portage/distfiles</path> to see if the necessary files are already |
233 | <path>/usr/portage/distfiles</path> to see if the necessary files are already |
| 234 | available. If not, it downloads the necessary files and places them in that |
234 | available. If not, it downloads the necessary files and places them in that |
| 235 | directory. |
235 | directory. |
| 236 | </p> |
236 | </p> |
| … | |
… | |
| 293 | <subsection> |
293 | <subsection> |
| 294 | <title>Selecting a Mirror for rsync</title> |
294 | <title>Selecting a Mirror for rsync</title> |
| 295 | <body> |
295 | <body> |
| 296 | |
296 | |
| 297 | <p> |
297 | <p> |
| 298 | It is adviseable to first select a fast <uri |
298 | It is advisable to first select a fast <uri |
| 299 | link="/main/en/mirrors.xml">mirror</uri> close to you. You can do this manually |
299 | link="/main/en/mirrors.xml">mirror</uri> close to you. You can do this manually |
| 300 | (by setting the <c>SYNC</c> variable in <path>/etc/make.conf</path>) or use |
300 | (by setting the <c>SYNC</c> variable in <path>/etc/make.conf</path>) or use |
| 301 | <c>mirrorselect</c> to do this for you automatically. As the <c>SYNC</c> |
301 | <c>mirrorselect</c> to do this for you automatically. As the <c>SYNC</c> |
| 302 | variable will be discussed later on, we will focus on using <c>mirrorselect</c>. |
302 | variable will be discussed later on, we will focus on using <c>mirrorselect</c>. |
| 303 | First install <c>mirrorselect</c> by emerging it: |
303 | First install <c>mirrorselect</c> by emerging it: |
| … | |
… | |
| 352 | |
352 | |
| 353 | <p> |
353 | <p> |
| 354 | Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to |
354 | Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to |
| 355 | install such an ebuild, you can choose between <e>building</e> the package and |
355 | install such an ebuild, you can choose between <e>building</e> the package and |
| 356 | using a <e>prebuilt</e> package. But what are the advantages/disadvantages of |
356 | using a <e>prebuilt</e> package. But what are the advantages/disadvantages of |
| 357 | both approaches, and can they be used next to each other? |
357 | both approaches, and can they be used alongside each other? |
| 358 | </p> |
358 | </p> |
| 359 | |
359 | |
| 360 | <p> |
360 | <p> |
| 361 | As you probably have guessed, building packages takes a lot of time (especially |
361 | As you probably have guessed, building packages takes a lot of time (especially |
| 362 | if you have little resources or want to build big packages, such as <uri |
362 | if you have little resources or want to build big packages, such as <uri |
| … | |
… | |
| 535 | <subsection> |
535 | <subsection> |
| 536 | <title>Working with Dependencies</title> |
536 | <title>Working with Dependencies</title> |
| 537 | <body> |
537 | <body> |
| 538 | |
538 | |
| 539 | <p> |
539 | <p> |
| 540 | Portage has an extensive support for dependency handling. Although you usually |
540 | Portage has extensive support for dependency handling. Although you usually |
| 541 | don't need to even think about this (as dependencies are automatically handled |
541 | don't need to even think about this (as dependencies are automatically handled |
| 542 | by Portage) some users might want to know how you can work with <c>emerge</c> |
542 | by Portage) some users might want to know how you can work with <c>emerge</c> |
| 543 | and dependencies. |
543 | and dependencies. |
| 544 | </p> |
544 | </p> |
| 545 | |
545 | |
| … | |
… | |
| 555 | # <i>emerge --emptytree --pretend gnumeric</i> |
555 | # <i>emerge --emptytree --pretend gnumeric</i> |
| 556 | </pre> |
556 | </pre> |
| 557 | |
557 | |
| 558 | <p> |
558 | <p> |
| 559 | Another argument is <c>--nodeps</c>, which will ask Portage to try install the |
559 | Another argument is <c>--nodeps</c>, which will ask Portage to try install the |
| 560 | given package without taking care of the dependencies. It is trivial that this |
560 | given package without taking care of the dependencies. This can all too often |
| 561 | can lead to failures. |
561 | lead to failures. |
| 562 | </p> |
562 | </p> |
| 563 | |
563 | |
| 564 | <pre caption="Installing gnumeric without taking care of the dependencies"> |
564 | <pre caption="Installing gnumeric without taking care of the dependencies"> |
| 565 | # <i>emerge --nodeps gnumeric</i> |
565 | # <i>emerge --nodeps gnumeric</i> |
| 566 | </pre> |
566 | </pre> |
| … | |
… | |
| 831 | edit the <c>ACCEPT_KEYWORDS</c> variable in <path>/etc/make.conf</path> so that |
831 | edit the <c>ACCEPT_KEYWORDS</c> variable in <path>/etc/make.conf</path> so that |
| 832 | it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.). |
832 | it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.). |
| 833 | </p> |
833 | </p> |
| 834 | |
834 | |
| 835 | <p> |
835 | <p> |
| 836 | Note though that it is far from trivial (if even impossible) to go back to |
836 | Note though that it is far from simple (or even impossible) to go back to |
| 837 | <e>ARCH</e> from <e>~ARCH</e>. |
837 | <e>ARCH</e> from <e>~ARCH</e>. |
| 838 | </p> |
838 | </p> |
| 839 | |
839 | |
| 840 | <p> |
840 | <p> |
| 841 | If you want to update your system now, you will notice that <e>a lot</e> of |
841 | If you want to update your system now, you will notice that <e>a lot</e> of |