/[gentoo]/xml/htdocs/proj/en/portage/doc/manually-fixing-portage.xml
Gentoo

Diff of /xml/htdocs/proj/en/portage/doc/manually-fixing-portage.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.16
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.15 2010/04/30 08:59:20 zmedico Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/portage/doc/manually-fixing-portage.xml,v 1.16 2010/08/18 05:20:27 zmedico Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/proj/en/portage/doc/manually-fixing-portage.xml"> 5<guide link="/proj/en/portage/doc/manually-fixing-portage.xml">
6 6
7<title>Manually fixing broken portage installations</title> 7<title>Manually fixing broken portage installations</title>
8 8
9<author> 9<author>
10 <mail link="genone@gentoo.org">Marius Mauch</mail> 10 <mail link="genone@gentoo.org">Marius Mauch</mail>
11</author> 11</author>
12 12
13<abstract> 13<abstract>
14This document attempts to help people to manually fix a broken sys-apps/portage 14This document attempts to help people to manually fix a broken sys-apps/portage
15installation. 15installation.
16</abstract> 16</abstract>
17 17
35(but apply common sense when necessary). 35(but apply common sense when necessary).
36</p> 36</p>
37 37
38</body> 38</body>
39</section> 39</section>
40<section> 40<section>
41<title>Getting a portage tarball</title> 41<title>Getting a portage tarball</title>
42<body> 42<body>
43 43
44<p> 44<p>
45The first step to do is to get the tarball of a current portage version. In the 45The first step to do is to get the tarball of a current portage version. In the
46following text we will use <e>portage-2.1.8</e> as an example (as this is the 46following text we will use <e>portage-2.1.8</e> as an example (as this is the
47current stable version at the time of this writing), please replace that with a 47current stable version at the time of this writing), please replace that with a
48version present in the tree if possible. 48version present in the tree if possible.
49</p> 49</p>
50
51<table>
52<tr><th>Python Version</th><th>Portage Version</th></tr>
53<tr>
54 <ti>&lt;= Python 2.5</ti>
55 <ti>
56 <uri link="http://distfiles.gentoo.org/distfiles/portage-2.1.6.tar.bz2">
57 portage-2.1.6.tar.bz2
58 </uri>
59 </ti>
60</tr>
61<tr>
62 <ti>&gt;= Python 2.6</ti>
63 <ti>
64 <uri link="http://distfiles.gentoo.org/distfiles/portage-2.1.8.tar.bz2">
65 portage-2.1.8.tar.bz2
66 </uri>
67 </ti>
68</tr>
69</table>
70
50<warn> 71<warn>
51If your currently installed version of python reported by <c>python -V</c> 72If your currently installed version of python reported by <c>python -V</c>
52is less than 2.6 then you must choose a version of portage that is compatible with 73is less than 2.6 then you must choose a version of portage that is compatible with
53it. If you have at least python 2.6 then use <e>portage-2.1.8.tar.bz2</e>. If 74it. If you have at least python 2.6 then use <e>portage-2.1.8.tar.bz2</e>. If
54you have python 2.4 or 2.5 then use <e>portage-2.1.6.tar.bz2</e>. 75you have python 2.4 or 2.5 then use <e>portage-2.1.6.tar.bz2</e>.
55</warn> 76</warn>
56 77
57<p> 78<p>
58Depending on the exact reason portage doesn't work for you anymore it may still 79Depending on the exact reason portage doesn't work for you anymore it may still
59be possible to use it to fetch the tarball for you, so as a first step please 80be possible to use it to fetch the tarball for you, so as a first step please
60try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't 81try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't
61work you have to manually fetch the tarball with: 82work you have to manually fetch the tarball with:
62</p> 83</p>
63 84
64<pre caption="Fetching portage tarball with wget"> 85<pre caption="Fetching portage tarball with wget">
84<pre caption="Unpacking portage tarball"> 105<pre caption="Unpacking portage tarball">
85# <i>cd /root</i> 106# <i>cd /root</i>
86# <i>mkdir portage-recover</i> 107# <i>mkdir portage-recover</i>
87# <i>cd portage-recover</i> 108# <i>cd portage-recover</i>
88# <i>tar xfj /usr/portage/distfiles/portage-2.1.8.tar.bz2</i> 109# <i>tar xfj /usr/portage/distfiles/portage-2.1.8.tar.bz2</i>
89</pre> 110</pre>
90 111
91<p> 112<p>
92After you have done this it's just a matter of replacing the python and bash 113After you have done this it's just a matter of replacing the python and bash
93files of your existing installation with the ones from the tarball (in most 114files of your existing installation with the ones from the tarball (in most
94cases anyway). To do so please run: 115cases anyway). To do so please run:
95</p> 116</p>
96 117
97<pre caption="Replacing installed files"> 118<pre caption="Replacing installed files">
98# <i>cd /root/portage-recover/portage-2.1.8</i> 119# <i>cd /root/portage-recover/portage-2.1.8</i>
120# <i>rm -rf /usr/lib/portage/*</i>
99# <i>cp -R pym bin /usr/lib/portage/</i> 121# <i>cp -R pym bin /usr/lib/portage/</i>
100</pre> 122</pre>
101 123
102<p> 124<p>
103If you are not using Gentoo on FreeBSD then you should remove the sed wrapper 125If you are not using Gentoo on FreeBSD then you should remove the sed wrapper
104script since it's not needed and it is known to cause problems with old 126script since it's not needed and it is known to cause problems with old
105versions of bash: 127versions of bash:
106</p> 128</p>
107 129
108<pre caption="Removing the sed wrapper script"> 130<pre caption="Removing the sed wrapper script">
109# <i>rm -f /usr/lib/portage/bin/sed</i> 131# <i>rm -f /usr/lib/portage/bin/sed</i>
110</pre> 132</pre>
111 133
112<note> 134<note>
113If you accidently unmerged portage before or lost 135If you accidently unmerged portage before or lost
123what the previous version of portage was. 145what the previous version of portage was.
124</note> 146</note>
125 147
126<p> 148<p>
127Now you should have a working portage install again. To ensure a consistent 149Now you should have a working portage install again. To ensure a consistent
128system state however you should now run <c>emerge sys-apps/portage</c> again 150system state however you should now run <c>emerge sys-apps/portage</c> again
129immediately. 151immediately.
130</p> 152</p>
131 153
132<p> 154<p>
133If you get a <e>command not found</e> error message when you try to run 155If you get a <e>command not found</e> error message when you try to run
134<c>emerge</c> you have to recreate the symlink: 156<c>emerge</c> you have to recreate the symlink:
135</p> 157</p>
136 158
137<pre caption="Recreating the emerge symlink"> 159<pre caption="Recreating the emerge symlink">
138# <i>ln -s ../lib/portage/bin/emerge /usr/bin/emerge</i> 160# <i>ln -sf ../lib/portage/bin/emerge /usr/bin/emerge</i>
139</pre> 161</pre>
140 162
141<p> 163<p>
142If these steps didn't work for you your problem is likely not a broken portage 164If these steps didn't work for you your problem is likely not a broken portage
143installation but something else beyond the scope of this document. Please 165installation but something else beyond the scope of this document. Please
144recheck the <uri link="/proj/en/portage/doc/common-problems.xml">list of common 166recheck the <uri link="/proj/en/portage/doc/common-problems.xml">list of common
145problems</uri> and also look in <uri 167problems</uri> and also look in <uri
146link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported there. 168link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported there.
147</p> 169</p>
148 170
149</body> 171</body>
150</section> 172</section>
151</chapter> 173</chapter>
152</guide> 174</guide>

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20