| … | |
… | |
| 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.19 2004/01/09 10:52:18 dertobi123 Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.30 2004/08/01 15:03:27 swift 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> |
| … | |
… | |
| 118 | Manifest metadata.xml openoffice-1.1.0-r1.ebuild openoffice-1.1.0.ebuild |
118 | Manifest metadata.xml openoffice-1.1.0-r1.ebuild openoffice-1.1.0.ebuild |
| 119 | </pre> |
119 | </pre> |
| 120 | |
120 | |
| 121 | <p> |
121 | <p> |
| 122 | Remember that we told you that a Gentoo package is called an ebuild? Well, in |
122 | Remember that we told you that a Gentoo package is called an ebuild? Well, in |
| 123 | the example directory four of such ebuilds are stored. Their naming is |
123 | the example directory, four of such ebuilds are stored. Their naming is |
| 124 | almost identical: they only differ in the version name. |
124 | almost identical; they only differ in the version name. |
| 125 | You are free to view the contents of such a package: they are plain scripts. We |
125 | You are free to view the contents of such a package: they are plain scripts. We |
| 126 | will not discuss it right now as it isn't important to know if you plan on just |
126 | will not discuss it right now as it isn't important to know if you plan on just |
| 127 | using Gentoo. |
127 | using Gentoo. |
| 128 | </p> |
128 | </p> |
| 129 | |
129 | |
| 130 | <p> |
130 | <p> |
| 131 | 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 |
| 132 | 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 |
| 133 | checksums and permissions of all the files in the directory) and |
133 | checksums and filesizes of all the files in the directory) and |
| 134 | <path>metadata.xml</path> (which contains more information about the package, |
134 | <path>metadata.xml</path> (which contains more information about the package, |
| 135 | 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 |
| 136 | extensive description). |
136 | extensive description). |
| 137 | </p> |
137 | </p> |
| 138 | |
138 | |
| 139 | <p> |
139 | <p> |
| 140 | Inside the <path>files</path> directory you will find extra files, needed by |
140 | Inside the <path>files</path> directory, you will find extra files, needed by |
| 141 | Portage: digests (checksums and permissions of the files needed by a single |
141 | Portage: digests (checksums and permissions of the files needed by a single |
| 142 | version of the package), patches, example configuration files, etc. |
142 | version of the package), patches, example configuration files, etc. |
| 143 | </p> |
143 | </p> |
| 144 | |
144 | |
| 145 | <pre caption="Viewing the extra files"> |
145 | <pre caption="Viewing the extra files"> |
| … | |
… | |
| 153 | nptl.patch |
153 | nptl.patch |
| 154 | </pre> |
154 | </pre> |
| 155 | |
155 | |
| 156 | <p> |
156 | <p> |
| 157 | If you go back to the root of the Portage tree (<path>/usr/portage</path>) you |
157 | If you go back to the root of the Portage tree (<path>/usr/portage</path>) you |
| 158 | will notice that there are other, non-category directories too. We will discuss |
158 | will notice that there are other, non-category directories, too. We will discuss |
| 159 | those later in this chapter. |
159 | those later in this chapter. |
| 160 | </p> |
160 | </p> |
| 161 | |
161 | |
| 162 | </body> |
162 | </body> |
| 163 | </subsection> |
163 | </subsection> |
| … | |
… | |
| 236 | </p> |
236 | </p> |
| 237 | |
237 | |
| 238 | <!-- |
238 | <!-- |
| 239 | <note> |
239 | <note> |
| 240 | 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 |
| 241 | time consuming. There are other, more performant tools available. We will |
241 | time consuming. There are other, best performing tools available. We will |
| 242 | 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 |
| 243 | Other Tools</uri>. |
243 | Other Tools</uri>. |
| 244 | </note> |
244 | </note> |
| 245 | --> |
245 | --> |
| 246 | |
246 | |
| … | |
… | |
| 550 | <p> |
550 | <p> |
| 551 | 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 |
| 552 | 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 |
| 553 | 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 |
| 554 | 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 |
| 555 | all listed packages. However, <c>glibc</c> will <e>not</e> be listed as |
555 | all listed packages. |
| 556 | dependency for safety reasons. |
|
|
| 557 | </p> |
556 | </p> |
| 558 | |
557 | |
| 559 | <pre caption="Show all dependencies of gnumeric"> |
558 | <pre caption="Show all dependencies of gnumeric"> |
| 560 | # <i>emerge --emptytree --pretend gnumeric</i> |
559 | # <i>emerge --emptytree --pretend gnumeric</i> |
| 561 | </pre> |
560 | </pre> |
| … | |
… | |
| 678 | <pre caption="Upgrading your entire system"> |
677 | <pre caption="Upgrading your entire system"> |
| 679 | # <i>emerge --update --upgradeonly world</i> |
678 | # <i>emerge --update --upgradeonly world</i> |
| 680 | </pre> |
679 | </pre> |
| 681 | |
680 | |
| 682 | <p> |
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> |
|
|
691 | </pre> |
|
|
692 | |
|
|
693 | <p> |
| 683 | 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 |
| 684 | perform the same actions for individual software packages. |
695 | perform the same actions for individual software packages. |
| 685 | </p> |
696 | </p> |
| 686 | |
697 | |
| 687 | </body> |
698 | </body> |
| … | |
… | |
| 740 | |
751 | |
| 741 | </body> |
752 | </body> |
| 742 | </subsection> |
753 | </subsection> |
| 743 | </section> |
754 | </section> |
| 744 | <section> |
755 | <section> |
| 745 | <title>Software Availability</title> |
756 | <title>Working with Masked Packages</title> |
| 746 | <subsection> |
757 | <subsection> |
| 747 | <title>ARCH or not?</title> |
758 | <title>ARCH or not?</title> |
| 748 | <body> |
759 | <body> |
| 749 | |
760 | |
| 750 | <p> |
761 | <p> |
| … | |
… | |
| 761 | 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. |
| 762 | </p> |
773 | </p> |
| 763 | |
774 | |
| 764 | <p> |
775 | <p> |
| 765 | 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 |
| 766 | 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 |
| 767 | submitting bugreports to <uri |
778 | with a broken system and you like submitting bugreports to <uri |
| 768 | 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 |
| 769 | <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, |
| 770 | 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 |
| 771 | 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.). |
| 772 | </p> |
783 | </p> |
| 773 | |
784 | |
| 774 | <p> |
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>. |
|
|
788 | </p> |
|
|
789 | |
|
|
790 | <p> |
| 775 | 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 |
| 776 | packages will be updated! |
792 | packages will be updated! |
| 777 | </p> |
793 | </p> |
| 778 | |
794 | |
| 779 | </body> |
795 | </body> |
| … | |
… | |
| 799 | <li>The package is in <e>~ARCH</e> while you use <e>ARCH</e></li> |
815 | <li>The package is in <e>~ARCH</e> while you use <e>ARCH</e></li> |
| 800 | <li>The package is hard-masked explicitly</li> |
816 | <li>The package is hard-masked explicitly</li> |
| 801 | </ol> |
817 | </ol> |
| 802 | |
818 | |
| 803 | <p> |
819 | <p> |
| 804 | If the package is masked because of the first reason, and you <e>really</e> want |
820 | If the package is masked because of the first reason, and you <e>really</e> |
| 805 | to install it (knowing that there <e>is</e> a reason why it isn't available in |
821 | want to install it (knowing that there <e>is</e> a reason why it isn't |
| 806 | <e>ARCH</e>), you can temporarily accept <e>~ARCH</e> packages: |
822 | available in <e>ARCH</e>), you can accept the <e>~ARCH</e> version of any |
|
|
823 | package by adding it to your <path>/etc/portage/package.keywords</path> file: |
| 807 | </p> |
824 | </p> |
| 808 | |
825 | |
| 809 | <pre caption="Temporarily accepting ~ARCH packages"> |
826 | <pre caption="Accepting the ~ARCH version of a package"> |
| 810 | # <i>ACCEPT_KEYWORDS="~x86" emerge gnumeric</i> |
827 | <comment>(Create the /etc/portage directory if it doesn't exist yet)</comment> |
|
|
828 | # <i>mkdir /etc/portage</i> |
|
|
829 | |
|
|
830 | # <i>echo "app-office/gnumeric ~x86" >> /etc/portage/package.keywords</i> |
|
|
831 | # <i>emerge gnumeric</i> |
| 811 | </pre> |
832 | </pre> |
| 812 | |
833 | |
| 813 | <p> |
834 | <p> |
| 814 | A package is hardmasked if it is listed in |
835 | A package is hardmasked if it is listed in |
| 815 | <path>/usr/portage/profiles/package.mask</path>. If you read this file, you |
836 | <path>/usr/portage/profiles/package.mask</path>. If you read this file, you |
| … | |
… | |
| 819 | "breaks other packages", or "badly needs testing"), create the |
840 | "breaks other packages", or "badly needs testing"), create the |
| 820 | <path>/etc/portage/package.unmask</path> file and list the package in it (use |
841 | <path>/etc/portage/package.unmask</path> file and list the package in it (use |
| 821 | the same format as is used in <path>/usr/portage/profiles/package.mask</path>). |
842 | the same format as is used in <path>/usr/portage/profiles/package.mask</path>). |
| 822 | </p> |
843 | </p> |
| 823 | |
844 | |
|
|
845 | <pre caption="Unmasking a hard-masked application"> |
|
|
846 | <comment>(Create the /etc/portage directory if it doesn't exist yet)</comment> |
|
|
847 | # <i>mkdir /etc/portage</i> |
|
|
848 | |
|
|
849 | # <i>echo "=app-office/gnumeric-1.2.12" >> /etc/portage/package.unmask</i> |
|
|
850 | </pre> |
|
|
851 | |
| 824 | <p> |
852 | <p> |
| 825 | Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as |
853 | Do <e>not</e> alter the <path>/usr/portage/profiles/package.mask</path> file as |
| 826 | all changes are undone the next time you update your Portage tree. If you want |
854 | all changes are undone the next time you update your Portage tree. |
|
|
855 | </p> |
|
|
856 | |
|
|
857 | <p> |
|
|
858 | Sometimes you might want to hardmask a (collection of) package(s). This is the |
|
|
859 | case when newer versions of an application don't support something you require |
|
|
860 | or when these versions break something else in your environment. |
|
|
861 | </p> |
|
|
862 | |
|
|
863 | <p> |
| 827 | to hardmask a package create <path>/etc/portage/package.mask</path> and list the |
864 | To hard-mask a package, create <path>/etc/portage/package.mask</path> and list the |
| 828 | package in it (use the same format as mentioned above). |
865 | package in it (use the same format as mentioned above). |
| 829 | </p> |
866 | </p> |
| 830 | |
867 | |
| 831 | <p> |
868 | <pre caption="Hard-masking a package"> |
| 832 | Another trick to circumvent the "masked package" problem is to install the |
869 | <comment>(Create the /etc/portage directory if it doesn't exist yet)</comment> |
| 833 | package using the full path. This will ignore both the <c>ACCEPT_KEYWORD</c> |
870 | # <i>mkdir /etc/portage</i> |
| 834 | settings and the <path>package.mask</path> listing. |
|
|
| 835 | </p> |
|
|
| 836 | |
871 | |
| 837 | <pre caption="Installing a package without checking for stadium / masking"> |
872 | # <i>echo ">app-office/gnumeric-1.2.10" >> /etc/portage/package.mask</i> |
| 838 | # <i>emerge /usr/portage/app-office/gnumeric/gnumeric-1.2.0.ebuild</i> |
|
|
| 839 | </pre> |
873 | </pre> |
| 840 | |
874 | |
| 841 | </body> |
875 | </body> |
| 842 | </subsection> |
876 | </subsection> |
| 843 | <subsection> |
877 | <subsection> |