| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/portage/doc/manually-fixing-portage.xml,v 1.17 2010/11/28 03:53:30 zmedico Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/portage/doc/manually-fixing-portage.xml,v 1.18 2010/12/20 18:02:15 zmedico Exp $ --> |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd" [ |
|
|
4 | <!ENTITY stable_version "2.1.9.25"> |
|
|
5 | ]> |
| 4 | |
6 | |
| 5 | <guide link="/proj/en/portage/doc/manually-fixing-portage.xml"> |
7 | <guide link="/proj/en/portage/doc/manually-fixing-portage.xml"> |
| 6 | |
8 | |
| 7 | <title>Manually fixing broken portage installations</title> |
9 | <title>Manually fixing broken portage installations</title> |
| 8 | |
10 | |
| … | |
… | |
| 41 | <title>Getting a portage tarball</title> |
43 | <title>Getting a portage tarball</title> |
| 42 | <body> |
44 | <body> |
| 43 | |
45 | |
| 44 | <p> |
46 | <p> |
| 45 | The first step to do is to get the tarball of a current portage version. In the |
47 | The first step to do is to get the tarball of a current portage version. In the |
| 46 | following text we will use <e>portage-2.1.9.24</e> as an example (as this is the |
48 | following text we will use <e>portage-&stable_version;</e> as an example (as this is the |
| 47 | current stable version at the time of this writing), please replace that with a |
49 | current stable version at the time of this writing), please replace that with a |
| 48 | version present in the tree if possible. |
50 | version present in the tree if possible. |
| 49 | </p> |
51 | </p> |
| 50 | |
52 | |
| 51 | <table> |
53 | <table> |
| … | |
… | |
| 59 | </ti> |
61 | </ti> |
| 60 | </tr> |
62 | </tr> |
| 61 | <tr> |
63 | <tr> |
| 62 | <ti>>= Python 2.6</ti> |
64 | <ti>>= Python 2.6</ti> |
| 63 | <ti> |
65 | <ti> |
| 64 | <uri link="http://distfiles.gentoo.org/distfiles/portage-2.1.9.24.tar.bz2"> |
66 | <uri link="http://distfiles.gentoo.org/distfiles/portage-&stable_version;.tar.bz2"> |
| 65 | portage-2.1.9.24.tar.bz2 |
67 | portage-&stable_version;.tar.bz2 |
| 66 | </uri> |
68 | </uri> |
| 67 | </ti> |
69 | </ti> |
| 68 | </tr> |
70 | </tr> |
| 69 | </table> |
71 | </table> |
| 70 | |
72 | |
| 71 | <warn> |
73 | <warn> |
| 72 | If your currently installed version of python reported by <c>python -V</c> |
74 | If your currently installed version of python reported by <c>python -V</c> |
| 73 | is less than 2.6 then you must choose a version of portage that is compatible with |
75 | is less than 2.6 then you must choose a version of portage that is compatible with |
| 74 | it. If you have at least python 2.6 then use <e>portage-2.1.9.24.tar.bz2</e>. If |
76 | it. If you have at least python 2.6 then use <e>portage-&stable_version;.tar.bz2</e>. If |
| 75 | you have python 2.4 or 2.5 then use <e>portage-2.1.6.tar.bz2</e>. |
77 | you have python 2.4 or 2.5 then use <e>portage-2.1.6.tar.bz2</e>. |
| 76 | </warn> |
78 | </warn> |
| 77 | |
79 | |
| 78 | <p> |
80 | <p> |
| 79 | Depending on the exact reason portage doesn't work for you anymore it may still |
81 | Depending on the exact reason portage doesn't work for you anymore it may still |
| … | |
… | |
| 81 | try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't |
83 | try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't |
| 82 | work you have to manually fetch the tarball with: |
84 | work you have to manually fetch the tarball with: |
| 83 | </p> |
85 | </p> |
| 84 | |
86 | |
| 85 | <pre caption="Fetching portage tarball with wget"> |
87 | <pre caption="Fetching portage tarball with wget"> |
| 86 | # <i>wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.1.9.24.tar.bz2</i> |
88 | # <i>wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-&stable_version;.tar.bz2</i> |
| 87 | </pre> |
89 | </pre> |
| 88 | |
90 | |
| 89 | <p> |
91 | <p> |
| 90 | After that you should have the tarball available as |
92 | After that you should have the tarball available as |
| 91 | <path>/usr/portage/distfiles/portage-2.1.9.24.tar.bz2</path>. |
93 | <path>/usr/portage/distfiles/portage-&stable_version;.tar.bz2</path>. |
| 92 | </p> |
94 | </p> |
| 93 | |
95 | |
| 94 | </body> |
96 | </body> |
| 95 | </section> |
97 | </section> |
| 96 | <section> |
98 | <section> |
| … | |
… | |
| 104 | |
106 | |
| 105 | <pre caption="Unpacking portage tarball"> |
107 | <pre caption="Unpacking portage tarball"> |
| 106 | # <i>cd /root</i> |
108 | # <i>cd /root</i> |
| 107 | # <i>mkdir portage-recover</i> |
109 | # <i>mkdir portage-recover</i> |
| 108 | # <i>cd portage-recover</i> |
110 | # <i>cd portage-recover</i> |
| 109 | # <i>tar xfj /usr/portage/distfiles/portage-2.1.9.24.tar.bz2</i> |
111 | # <i>tar xfj /usr/portage/distfiles/portage-&stable_version;.tar.bz2</i> |
| 110 | </pre> |
112 | </pre> |
| 111 | |
113 | |
| 112 | <p> |
114 | <p> |
| 113 | After you have done this it's just a matter of replacing the python and bash |
115 | After you have done this it's just a matter of replacing the python and bash |
| 114 | files of your existing installation with the ones from the tarball (in most |
116 | files of your existing installation with the ones from the tarball (in most |
| 115 | cases anyway). To do so please run: |
117 | cases anyway). To do so please run: |
| 116 | </p> |
118 | </p> |
| 117 | |
119 | |
| 118 | <pre caption="Replacing installed files"> |
120 | <pre caption="Replacing installed files"> |
| 119 | # <i>cd /root/portage-recover/portage-2.1.9.24</i> |
121 | # <i>cd /root/portage-recover/portage-&stable_version;</i> |
| 120 | # <i>rm -rf /usr/lib/portage/*</i> |
122 | # <i>rm -rf /usr/lib/portage/*</i> |
| 121 | # <i>cp -R pym bin /usr/lib/portage/</i> |
123 | # <i>cp -R pym bin /usr/lib/portage/</i> |
| 122 | </pre> |
124 | </pre> |
| 123 | |
125 | |
| 124 | <p> |
126 | <p> |