|
|
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.13 2003/12/04 22:26:19 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.25 2004/05/09 10:48:51 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> |
| … | |
… | |
| 125 | </p> |
128 | </p> |
| 126 | |
129 | |
| 127 | <p> |
130 | <p> |
| 128 | The other files are the <path>ChangeLog</path> (which contains a listing of all |
131 | The other files are the <path>ChangeLog</path> (which contains a listing of all |
| 129 | the changes done to the ebuilds), <path>Manifest</path> (which contains the |
132 | the changes done to the ebuilds), <path>Manifest</path> (which contains the |
| 130 | checksums and permissions of all the files in the directory) and |
133 | checksums and filesizes of all the files in the directory) and |
| 131 | <path>metadata.xml</path> (which contains more information about the package, |
134 | <path>metadata.xml</path> (which contains more information about the package, |
| 132 | such as the responsible development group -- called <e>herd</e> -- and a more |
135 | such as the responsible development group -- called <e>herd</e> -- and a more |
| 133 | extensive description). |
136 | extensive description). |
| 134 | </p> |
137 | </p> |
| 135 | |
138 | |
| … | |
… | |
| 224 | |
227 | |
| 225 | <p> |
228 | <p> |
| 226 | You see something new? Yes, <e>downloaded files</e>. When you tell Portage to |
229 | You see something new? Yes, <e>downloaded files</e>. When you tell Portage to |
| 227 | install a package, it of course needs to have the necessary sources (or |
230 | install a package, it of course needs to have the necessary sources (or |
| 228 | precompiled packages) available. It therefore checks the contents of |
231 | precompiled packages) available. It therefore checks the contents of |
| 229 | <path>/usr/portage/distfiles</path> (for sourcecode) or |
232 | <path>/usr/portage/distfiles</path> (for source code) or |
| 230 | <path>/usr/portage/packages/All</path> (for precompiled packages) to see if the |
233 | <path>/usr/portage/packages/All</path> (for precompiled packages) to see if the |
| 231 | necessary files are already available. If not, it downloads the necessary files |
234 | necessary files are already available. If not, it downloads the necessary files |
| 232 | and places them in those directories. |
235 | and places them in those directories. |
| 233 | </p> |
236 | </p> |
| 234 | |
237 | |
|
|
238 | <!-- |
| 235 | <note> |
239 | <note> |
| 236 | Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very |
240 | Searching the Portage Tree, especially when using <c>- -searchdesc</c>, is very |
| 237 | time consuming. There are other, more performant tools available. We will |
241 | time consuming. There are other, more performant tools available. We will |
| 238 | describe those in the chapter on <uri link="?part=2&chap=7">Gentoolkit and |
242 | describe those in the chapter on <uri link="?part=2&chap=7">Gentoolkit and |
| 239 | Other Tools</uri>. |
243 | Other Tools</uri>. |
| 240 | </note> |
244 | </note> |
|
|
245 | --> |
| 241 | |
246 | |
| 242 | </body> |
247 | </body> |
| 243 | </subsection> |
248 | </subsection> |
| 244 | <subsection> |
249 | <subsection> |
| 245 | <title>Viewing the ChangeLog</title> |
250 | <title>Viewing the ChangeLog</title> |
| 246 | <body> |
251 | <body> |
| 247 | |
252 | |
| 248 | <p> |
253 | <p> |
| 249 | While browsing through the Portage Tree, you saw that there was a ChangeLog for |
254 | While browsing through the Portage Tree, you saw that there was a ChangeLog for |
| 250 | each package. You can view this ChangeLog with <c>emerge</c> too. Use the |
255 | each package. You can view the ChangeLog entries between the available version |
|
|
256 | and 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 |
257 | <c>--pretend --changelog</c> (<c>-pl</c> in short) options. As an example we |
| 252 | will view the ChangeLog entries for <c>gnumeric</c>: |
258 | will view the ChangeLog entries for <c>gnumeric</c>: |
| 253 | </p> |
259 | </p> |
| 254 | |
260 | |
| 255 | <pre caption="Viewing the ChangeLog entries for gnumeric"> |
261 | <pre caption="Viewing the ChangeLog entries for gnumeric"> |
| 256 | # <i>emerge --pretend --changelog gnumeric</i> |
262 | # <i>emerge --pretend --changelog gnumeric</i> |
|
|
263 | <comment>(Some output removed to improve readability)</comment> |
|
|
264 | *gnumeric-1.2.2 |
|
|
265 | |
|
|
266 | 27 Nov 2003; foser <foser@gentoo.org> gnumeric-1.2.2.ebuild : |
|
|
267 | New release, requested in #34492 |
|
|
268 | updated deps |
|
|
269 | |
|
|
270 | 12 Nov 2003; Jason Wever <weeve@gentoo.org> gnumeric-1.2.0.ebuild: |
|
|
271 | Marked stable on sparc, fixes bug #32405. |
|
|
272 | |
|
|
273 | 14 Oct 2003; Jason Wever <weeve@gentoo.org> gnumeric-1.0.8.ebuild: |
|
|
274 | Added ~sparc keyword. Fixes bug #31150. |
| 257 | </pre> |
275 | </pre> |
| 258 | |
276 | |
| 259 | </body> |
277 | </body> |
| 260 | </subsection> |
278 | </subsection> |
| 261 | </section> |
279 | </section> |
| … | |
… | |
| 298 | # <i>emerge --usepkg mirrorselect</i> |
316 | # <i>emerge --usepkg mirrorselect</i> |
| 299 | </pre> |
317 | </pre> |
| 300 | |
318 | |
| 301 | <p> |
319 | <p> |
| 302 | Now run <c>mirrorselect</c> to automatically select mirrors for you (it will |
320 | Now run <c>mirrorselect</c> to automatically select mirrors for you (it will |
| 303 | also setup Portage to use a mirror for the sourcecode): |
321 | also setup Portage to use a mirror for the source code): |
| 304 | </p> |
322 | </p> |
| 305 | |
323 | |
| 306 | <pre caption="Running mirrorselect"> |
324 | <pre caption="Running mirrorselect"> |
| 307 | # <i>mirrorselect -a -s3</i> |
325 | # <i>mirrorselect -a -s3</i> |
| 308 | </pre> |
326 | </pre> |
| … | |
… | |
| 341 | <title>Building or Prebuilt?</title> |
359 | <title>Building or Prebuilt?</title> |
| 342 | <body> |
360 | <body> |
| 343 | |
361 | |
| 344 | <p> |
362 | <p> |
| 345 | Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to |
363 | Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to |
| 346 | install such an ebuild, you can choose between <e>building</e> the package, or |
364 | install such an ebuild, you can choose between <e>building</e> the package and |
| 347 | using a <e>prebuilt</e> package. But what are the advantages/disadvantages of |
365 | using a <e>prebuilt</e> package. But what are the advantages/disadvantages of |
| 348 | both approaches, and can they be used next to each other? |
366 | both approaches, and can they be used next to each other? |
| 349 | </p> |
367 | </p> |
| 350 | |
368 | |
| 351 | <p> |
369 | <p> |
| … | |
… | |
| 364 | <c>CFLAGS</c> & <c>CXXFLAGS</c> variables. |
382 | <c>CFLAGS</c> & <c>CXXFLAGS</c> variables. |
| 365 | </p> |
383 | </p> |
| 366 | |
384 | |
| 367 | <p> |
385 | <p> |
| 368 | As previously stated, prebuilt packages are stored in the |
386 | As previously stated, prebuilt packages are stored in the |
| 369 | <path>/usr/portage/packages/All</path> directory, while the sourcecode of the |
387 | <path>/usr/portage/packages/All</path> directory, while the source code of the |
| 370 | packages are placed in <path>/usr/portage/distfiles</path>. If you have finished |
388 | packages is placed in <path>/usr/portage/distfiles</path>. If you have finished |
| 371 | installing a package you can remove the package or sourcecode from the |
389 | installing a package you can remove the package or source code from the |
| 372 | respective directory. However, you might want to keep the package/sourcecode of |
390 | respective directory. However, you might want to keep the package/source code of |
| 373 | the latest version, just in case you want to reinstall the package (so you don't |
391 | the latest version, just in case you want to reinstall the package (so you don't |
| 374 | have to redownload it). |
392 | have to redownload it). |
| 375 | </p> |
393 | </p> |
| 376 | |
394 | |
| 377 | </body> |
395 | </body> |
| … | |
… | |
| 391 | <pre caption="Building gnumeric"> |
409 | <pre caption="Building gnumeric"> |
| 392 | # <i>emerge gnumeric</i> |
410 | # <i>emerge gnumeric</i> |
| 393 | </pre> |
411 | </pre> |
| 394 | |
412 | |
| 395 | <p> |
413 | <p> |
| 396 | This will download the sourcecode for you and unpacks, compiles and installs the |
414 | This will download the source code for you and unpacks, compiles and installs |
| 397 | package on your system. It will also do the same for all the dependencies. If |
415 | the package on your system. It will also do the same for all the dependencies. |
| 398 | you want to see what dependencies will be installed with it, use the |
416 | If you want to see what dependencies will be installed with it, use the |
| 399 | <c>--pretend</c> option (<c>-p</c> in short): |
417 | <c>--pretend</c> option (<c>-p</c> in short): |
| 400 | </p> |
418 | </p> |
| 401 | |
419 | |
| 402 | <pre caption="Pretending to build gnumeric"> |
420 | <pre caption="Pretending to build gnumeric"> |
| 403 | # <i>emerge --pretend gnumeric</i> |
421 | # <i>emerge --pretend gnumeric</i> |
| 404 | </pre> |
422 | </pre> |
| 405 | |
423 | |
| 406 | <p> |
424 | <p> |
| 407 | If you want to download the sourcecode of the package and its dependencies, |
425 | If you want to download the source code of the package and its dependencies, |
| 408 | but don't want to build the package, use the <c>--fetchonly</c> option |
426 | but don't want to build the package, use the <c>--fetchonly</c> option |
| 409 | (<c>-f</c> in short): |
427 | (<c>-f</c> in short): |
| 410 | </p> |
428 | </p> |
| 411 | |
429 | |
| 412 | <pre caption="Fetching sources for gnumeric"> |
430 | <pre caption="Fetching sources for gnumeric"> |
| … | |
… | |
| 532 | <p> |
550 | <p> |
| 533 | For instance, if you want Portage to pretend that none of the dependencies of a |
551 | For instance, if you want Portage to pretend that none of the dependencies of a |
| 534 | package are installed, you can use <c>--emptytree</c> (<c>-e</c> in short). This |
552 | package are installed, you can use <c>--emptytree</c> (<c>-e</c> in short). This |
| 535 | is useful with <c>--pretend</c> to display a complete tree of dependencies for |
553 | is useful with <c>--pretend</c> to display a complete tree of dependencies for |
| 536 | any particular package. Without <c>--pretend</c>, <c>emerge</c> will (re)compile |
554 | any particular package. Without <c>--pretend</c>, <c>emerge</c> will (re)compile |
| 537 | all listed packages. However, <c>glibc</c> will <e>not</e> be listed as |
555 | all listed packages. |
| 538 | dependency for safety reasons. |
|
|
| 539 | </p> |
556 | </p> |
| 540 | |
557 | |
| 541 | <pre caption="Show all dependencies of gnumeric"> |
558 | <pre caption="Show all dependencies of gnumeric"> |
| 542 | # <i>emerge --emptytree --pretend gnumeric</i> |
559 | # <i>emerge --emptytree --pretend gnumeric</i> |
| 543 | </pre> |
560 | </pre> |
| … | |
… | |
| 551 | <pre caption="Installing gnumeric without taking care of the dependencies"> |
568 | <pre caption="Installing gnumeric without taking care of the dependencies"> |
| 552 | # <i>emerge --nodeps gnumeric</i> |
569 | # <i>emerge --nodeps gnumeric</i> |
| 553 | </pre> |
570 | </pre> |
| 554 | |
571 | |
| 555 | <p> |
572 | <p> |
| 556 | To opposite of <c>--nodeps</c> is <c>--onlydeps</c>, which will have Portage |
573 | The opposite of <c>--nodeps</c> is <c>--onlydeps</c>, which will have Portage |
| 557 | install all dependencies of a given package, but not the package itself: |
574 | install all dependencies of a given package, but not the package itself: |
| 558 | </p> |
575 | </p> |
| 559 | |
576 | |
| 560 | <pre caption="Installing the dependencies of gnumeric"> |
577 | <pre caption="Installing the dependencies of gnumeric"> |
| 561 | # <i>emerge --onlydeps gnumeric</i> |
578 | # <i>emerge --onlydeps gnumeric</i> |
| … | |
… | |
| 630 | </li> |
647 | </li> |
| 631 | <li> |
648 | <li> |
| 632 | <e>R</e> (reemerge) The package isn't new, but needs to be reemerged |
649 | <e>R</e> (reemerge) The package isn't new, but needs to be reemerged |
| 633 | </li> |
650 | </li> |
| 634 | <li> |
651 | <li> |
| 635 | <e>F</e> (fetch) The package requires that you download the sourcecode |
652 | <e>F</e> (fetch) The package requires that you download the source code |
| 636 | manually (for instance due to licencing issues) |
653 | manually (for instance due to licencing issues) |
| 637 | </li> |
654 | </li> |
| 638 | <li> |
655 | <li> |
| 639 | <e>U</e> (update) The package already exists on your system but will be |
656 | <e>U</e> (update) The package already exists on your system but will be |
| 640 | upgraded |
657 | upgraded |
| … | |
… | |
| 657 | <c>--upgradeonly</c> option (<c>-U</c> in short): |
674 | <c>--upgradeonly</c> option (<c>-U</c> in short): |
| 658 | </p> |
675 | </p> |
| 659 | |
676 | |
| 660 | <pre caption="Upgrading your entire system"> |
677 | <pre caption="Upgrading your entire system"> |
| 661 | # <i>emerge --update --upgradeonly world</i> |
678 | # <i>emerge --update --upgradeonly world</i> |
|
|
679 | </pre> |
|
|
680 | |
|
|
681 | <p> |
|
|
682 | We have mentioned that the <e>world</e> file doesn't contain dependencies. When |
|
|
683 | you run <c>emerge --update world</c> only the packages mentioned in the |
|
|
684 | <e>world</e> file and it's immediate dependencies are checked and, if necessary, |
|
|
685 | upgraded. If you want <c>emerge</c> to check <e>all</e> the dependencies |
|
|
686 | (including the dependencies of the dependencies), add the <c>--deep</c> flag: |
|
|
687 | </p> |
|
|
688 | |
|
|
689 | <pre caption="Upgrading your entire system, including all dependencies"> |
|
|
690 | # <i>emerge --update --deep world</i> |
| 662 | </pre> |
691 | </pre> |
| 663 | |
692 | |
| 664 | <p> |
693 | <p> |
| 665 | Of course, we are talking here about <e>system</e> and <e>world</e>, but you can |
694 | Of course, we are talking here about <e>system</e> and <e>world</e>, but you can |
| 666 | perform the same actions for individual software packages. |
695 | perform the same actions for individual software packages. |
| … | |
… | |
| 713 | </li> |
742 | </li> |
| 714 | <li> |
743 | <li> |
| 715 | <c>!empty</c> : The listed directory is not empty |
744 | <c>!empty</c> : The listed directory is not empty |
| 716 | </li> |
745 | </li> |
| 717 | <li> |
746 | <li> |
| 718 | <c>cfgpro</c> : Another already installed package claims to own this file |
747 | <c>cfgpro</c> : This file is located inside a protected directory and will |
|
|
748 | not be touched for safety |
| 719 | </li> |
749 | </li> |
| 720 | </ul> |
750 | </ul> |
| 721 | |
751 | |
| 722 | </body> |
752 | </body> |
| 723 | </subsection> |
753 | </subsection> |
| … | |
… | |
| 742 | to <e>ARCH</e> after being bugfree for a sufficient amount of time. |
772 | to <e>ARCH</e> after being bugfree for a sufficient amount of time. |
| 743 | </p> |
773 | </p> |
| 744 | |
774 | |
| 745 | <p> |
775 | <p> |
| 746 | Your system will use <e>ARCH</e> packages per default. If you want to live on |
776 | Your system will use <e>ARCH</e> packages per default. If you want to live on |
| 747 | the edge, don't mind having a broken package once in a while, and you like |
777 | the edge, don't mind having a broken package once in a while, know how to deal |
| 748 | submitting bugreports to <uri |
778 | with a broken system and you like submitting bugreports to <uri |
| 749 | link="http://bugs.gentoo.org">bugs.gentoo.org</uri>, then you can opt to use |
779 | link="http://bugs.gentoo.org">bugs.gentoo.org</uri>, then you can opt to use |
| 750 | <e>~ARCH</e> packages. To "move" your system to a <e>~ARCH</e>-using system, |
780 | <e>~ARCH</e> packages. To "move" your system to a <e>~ARCH</e>-using system, |
| 751 | edit the <c>ACCEPT_KEYWORDS</c> variable in <path>/etc/make.conf</path> so that |
781 | edit the <c>ACCEPT_KEYWORDS</c> variable in <path>/etc/make.conf</path> so that |
| 752 | it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.). |
782 | it reads <e>~ARCH</e> (again: for x86-based systems: <e>~x86</e>, etc.). |
|
|
783 | </p> |
|
|
784 | |
|
|
785 | <p> |
|
|
786 | Note though that it is far from trivial (if even impossible) to go back to |
|
|
787 | <e>ARCH</e> from <e>~ARCH</e>. |
| 753 | </p> |
788 | </p> |
| 754 | |
789 | |
| 755 | <p> |
790 | <p> |
| 756 | If you want to update your system now, you will notice that <e>a lot</e> of |
791 | If you want to update your system now, you will notice that <e>a lot</e> of |
| 757 | packages will be updated! |
792 | packages will be updated! |
| … | |
… | |
| 802 | the same format as is used in <path>/usr/portage/profiles/package.mask</path>). |
837 | the same format as is used in <path>/usr/portage/profiles/package.mask</path>). |
| 803 | </p> |
838 | </p> |
| 804 | |
839 | |
| 805 | <p> |
840 | <p> |
| 806 | Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as |
841 | Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as |
| 807 | all changes are undone the next time you update your Portage tree. |
842 | all changes are undone the next time you update your Portage tree. If you want |
|
|
843 | to hardmask a package create <path>/etc/portage/package.mask</path> and list the |
|
|
844 | package in it (use the same format as mentioned above). |
| 808 | </p> |
845 | </p> |
| 809 | |
846 | |
|
|
847 | <!-- |
| 810 | <p> |
848 | <p> |
| 811 | Another trick to circumvent the "masked package" problem is to install the |
849 | Another trick to circumvent the "masked package" problem is to install the |
| 812 | package using the full path. This will ignore both the <c>ACCEPT_KEYWORD</c> |
850 | package using the full path. This will ignore both the <c>ACCEPT_KEYWORD</c> |
| 813 | settings and the <path>package.mask</path> listing. |
851 | settings and the <path>package.mask</path> listing. |
| 814 | </p> |
852 | </p> |
| 815 | |
853 | |
| 816 | <pre caption="Installing a package without checking for stadium / masking"> |
854 | <pre caption="Installing a package without checking for stadium / masking"> |
| 817 | # <i>emerge /usr/portage/app-office/gnumeric/gnumeric-1.2.0.ebuild</i> |
855 | # <i>emerge /usr/portage/app-office/gnumeric/gnumeric-1.2.0.ebuild</i> |
| 818 | </pre> |
856 | </pre> |
|
|
857 | --> |
| 819 | |
858 | |
| 820 | </body> |
859 | </body> |
| 821 | </subsection> |
860 | </subsection> |
| 822 | <subsection> |
861 | <subsection> |
| 823 | <title>Blocked Packages</title> |
862 | <title>Blocked Packages</title> |