| 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.6 2007/04/30 08:48:06 rane Exp $ --> |
| 2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
|
|
4 | |
| 3 | <guide link="/proj/en/portage/doc/manually-fixing-portage.xml"> |
5 | <guide link="/proj/en/portage/doc/manually-fixing-portage.xml"> |
|
|
6 | |
| 4 | <title>Manually fixing broken portage installations</title> |
7 | <title>Manually fixing broken portage installations</title> |
|
|
8 | |
| 5 | <author> |
9 | <author> |
| 6 | <mail link="genone@gentoo.org">Marius Mauch</mail> |
10 | <mail link="genone@gentoo.org">Marius Mauch</mail> |
| 7 | </author> |
11 | </author> |
| 8 | |
12 | |
| 9 | <abstract> |
13 | <abstract> |
| 10 | This document attempts to help people to manually fix a broken sys-apps/portage |
14 | This document attempts to help people to manually fix a broken sys-apps/portage |
| 11 | installation. |
15 | installation. |
| 12 | </abstract> |
16 | </abstract> |
| 13 | |
17 | |
|
|
18 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
|
|
19 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 14 | <license/> |
20 | <license/> |
| 15 | |
21 | |
| 16 | <version>0.1</version> |
22 | <version>0.2</version> |
| 17 | <date>19 Feb 2006</date> |
23 | <date>2006-02-19</date> |
| 18 | |
24 | |
| 19 | <chapter> |
25 | <chapter> |
| 20 | <title>Manually fixing portage</title> |
26 | <title>Manually fixing portage</title> |
| 21 | |
|
|
| 22 | <section> |
27 | <section> |
| 23 | <title>Purpose</title> |
28 | <title>Purpose</title> |
| 24 | <body> |
29 | <body> |
|
|
30 | |
|
|
31 | <p> |
| 25 | <p>This section will tell you how to manually update/fix your portage installation |
32 | This section will tell you how to manually update/fix your portage installation |
| 26 | in case you can't run <c>emerge sys-apps/portage</c>. While not hard it is still to be done |
33 | in case you can't run <c>emerge sys-apps/portage</c>. While not hard it is |
| 27 | with great care, so please follow the listed steps exactly (but apply common sense |
34 | still to be done with great care, so please follow the listed steps exactly |
| 28 | when necessary).</p> |
35 | (but apply common sense when necessary). |
|
|
36 | </p> |
|
|
37 | |
| 29 | </body> |
38 | </body> |
| 30 | </section> |
39 | </section> |
| 31 | |
|
|
| 32 | <section> |
40 | <section> |
| 33 | <title>Getting a portage tarball</title> |
41 | <title>Getting a portage tarball</title> |
| 34 | <body> |
42 | <body> |
|
|
43 | |
|
|
44 | <p> |
| 35 | <p>The first step to do is to get the tarball of a current portage version. In |
45 | The first step to do is to get the tarball of a current portage version. In the |
| 36 | the following text we will use <e>portage-2.1.1</e> as an example (as this |
46 | following text we will use <e>portage-2.1.1</e> as an example (as this is the |
| 37 | is the current stable version at the time of this writing), please replace that |
47 | current stable version at the time of this writing), please replace that with a |
| 38 | with a version present in the tree.</p> |
48 | version present in the tree. |
|
|
49 | </p> |
|
|
50 | |
|
|
51 | <p> |
| 39 | <p>Depending on the exact reason portage doesn't work for you anymore it may still |
52 | Depending on the exact reason portage doesn't work for you anymore it may still |
| 40 | be possible to use it to fetch the tarball for you, so as a first step please |
53 | be possible to use it to fetch the tarball for you, so as a first step please |
| 41 | try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't work |
54 | try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't |
| 42 | you have to manually fetch the tarball with:</p> |
55 | work you have to manually fetch the tarball with: |
|
|
56 | </p> |
|
|
57 | |
| 43 | <pre caption="fetching portage tarball with wget"> |
58 | <pre caption="Fetching portage tarball with wget"> |
| 44 | wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.1.1.tar.bz2 |
59 | # <i>wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.1.1.tar.bz2</i> |
| 45 | </pre> |
60 | </pre> |
|
|
61 | |
|
|
62 | <p> |
| 46 | <p>After that you should have the tarball available as |
63 | After that you should have the tarball available as |
| 47 | <path>/usr/portage/distfiles/portage-2.1.1.tar.bz2</path>.</p> |
64 | <path>/usr/portage/distfiles/portage-2.1.1.tar.bz2</path>. |
|
|
65 | </p> |
|
|
66 | |
| 48 | </body> |
67 | </body> |
| 49 | </section> |
68 | </section> |
| 50 | |
|
|
| 51 | <section> |
69 | <section> |
| 52 | <title>Replacing the installed version</title> |
70 | <title>Replacing the installed version</title> |
| 53 | <body> |
71 | <body> |
|
|
72 | |
|
|
73 | <p> |
| 54 | <p>The next step is to unpack the tarball to a temporary location, using |
74 | The next step is to unpack the tarball to a temporary location, using |
| 55 | <path>/root/portage-recover</path> as example the commands to do that are:</p> |
75 | <path>/root/portage-recover</path> as example the commands to do that are: |
|
|
76 | </p> |
|
|
77 | |
| 56 | <pre caption="unpacking portage tarball"> |
78 | <pre caption="Unpacking portage tarball"> |
| 57 | cd /root |
79 | # <i>cd /root</i> |
| 58 | mkdir portage-recover |
80 | # <i>mkdir portage-recover</i> |
| 59 | cd portage-recover |
81 | # <i>cd portage-recover</i> |
| 60 | tar xfj /usr/portage/distfiles/portage-2.1.1.tar.bz2 |
82 | # <i>tar xfj /usr/portage/distfiles/portage-2.1.1.tar.bz2</i> |
| 61 | </pre> |
83 | </pre> |
|
|
84 | |
|
|
85 | <p> |
| 62 | <p>After you have done this it's just a matter of replacing the python and bash |
86 | After you have done this it's just a matter of replacing the python and bash |
| 63 | files of your existing installation with the ones from the tarball (in most cases |
87 | files of your existing installation with the ones from the tarball (in most |
| 64 | anyway). To do so please run:</p> |
88 | cases anyway). To do so please run: |
|
|
89 | </p> |
|
|
90 | |
| 65 | <pre caption="replacing installed files"> |
91 | <pre caption="Replacing installed files"> |
| 66 | cd /root/portage-recover/portage-2.1.1 |
92 | # <i>cd /root/portage-recover/portage-2.1.1</i> |
| 67 | cp -R pym bin /usr/lib/portage/ |
93 | # <i>cp -R pym bin /usr/lib/portage/</i> |
| 68 | </pre> |
94 | </pre> |
|
|
95 | |
|
|
96 | <p> |
| 69 | <p>Now you should have a working portage install again. To ensure a consistent |
97 | Now you should have a working portage install again. To ensure a consistent |
| 70 | system state however you should now run <c>emerge sys-apps/portage</c> again |
98 | system state however you should now run <c>emerge sys-apps/portage</c> again |
| 71 | immediately.</p> |
99 | immediately. |
|
|
100 | </p> |
|
|
101 | |
|
|
102 | <p> |
| 72 | <p>If you get a <c>command not found</c> error message when you try to run |
103 | If you get a <e>command not found</e> error message when you try to run |
| 73 | <c>emerge</c> you have to recreate the symlink:</p> |
104 | <c>emerge</c> you have to recreate the symlink: |
|
|
105 | </p> |
|
|
106 | |
| 74 | <pre caption="recreating the emerge symlink"> |
107 | <pre caption="Recreating the emerge symlink"> |
| 75 | ln -s ../lib/portage/bin/emerge /usr/bin/emerge |
108 | # <i>ln -s ../lib/portage/bin/emerge /usr/bin/emerge</i> |
| 76 | </pre> |
109 | </pre> |
|
|
110 | |
|
|
111 | <p> |
| 77 | <p>If these steps didn't work for you your problem is likely not a broken portage |
112 | If these steps didn't work for you your problem is likely not a broken portage |
| 78 | installation but something else beyond the scope of this document. Please recheck |
113 | installation but something else beyond the scope of this document. Please |
| 79 | the <uri link="common-problems.xml">list of common problems</uri> and also look |
114 | recheck the <uri link="/proj/en/portage/doc/common-problems.xml">list of common |
|
|
115 | problems</uri> and also look in <uri |
| 80 | in <uri link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported |
116 | link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported there. |
| 81 | there.</p> |
117 | </p> |
|
|
118 | |
| 82 | </body> |
119 | </body> |
| 83 | </section> |
120 | </section> |
| 84 | |
|
|
| 85 | </chapter> |
121 | </chapter> |
| 86 | |
|
|
| 87 | </guide> |
122 | </guide> |