/[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.17 Revision 1.18
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
9<author> 11<author>
10 <mail link="genone@gentoo.org">Marius Mauch</mail> 12 <mail link="genone@gentoo.org">Marius Mauch</mail>
11</author> 13</author>
12 14
13<abstract> 15<abstract>
14This document attempts to help people to manually fix a broken sys-apps/portage 16This document attempts to help people to manually fix a broken sys-apps/portage
15installation. 17installation.
16</abstract> 18</abstract>
17 19
18<!-- The content of this document is licensed under the CC-BY-SA license --> 20<!-- The content of this document is licensed under the CC-BY-SA license -->
31<p> 33<p>
32This section will tell you how to manually update/fix your portage installation 34This section will tell you how to manually update/fix your portage installation
33in case you can't run <c>emerge sys-apps/portage</c>. While not hard it is 35in case you can't run <c>emerge sys-apps/portage</c>. While not hard it is
34still to be done with great care, so please follow the listed steps exactly 36still to be done with great care, so please follow the listed steps exactly
35(but apply common sense when necessary). 37(but apply common sense when necessary).
36</p> 38</p>
37 39
38</body> 40</body>
39</section> 41</section>
40<section> 42<section>
41<title>Getting a portage tarball</title> 43<title>Getting a portage tarball</title>
42<body> 44<body>
43 45
44<p> 46<p>
45The first step to do is to get the tarball of a current portage version. In the 47The 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.9.24</e> as an example (as this is the 48following text we will use <e>portage-&stable_version;</e> as an example (as this is the
47current stable version at the time of this writing), please replace that with a 49current stable version at the time of this writing), please replace that with a
48version present in the tree if possible. 50version present in the tree if possible.
49</p> 51</p>
50 52
51<table> 53<table>
52<tr><th>Python Version</th><th>Portage Version</th></tr> 54<tr><th>Python Version</th><th>Portage Version</th></tr>
53<tr> 55<tr>
54 <ti>&lt;= Python 2.5</ti> 56 <ti>&lt;= Python 2.5</ti>
55 <ti> 57 <ti>
56 <uri link="http://distfiles.gentoo.org/distfiles/portage-2.1.6.tar.bz2"> 58 <uri link="http://distfiles.gentoo.org/distfiles/portage-2.1.6.tar.bz2">
57 portage-2.1.6.tar.bz2 59 portage-2.1.6.tar.bz2
58 </uri> 60 </uri>
59 </ti> 61 </ti>
60</tr> 62</tr>
61<tr> 63<tr>
62 <ti>&gt;= Python 2.6</ti> 64 <ti>&gt;= 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>
72If your currently installed version of python reported by <c>python -V</c> 74If your currently installed version of python reported by <c>python -V</c>
73is less than 2.6 then you must choose a version of portage that is compatible with 75is less than 2.6 then you must choose a version of portage that is compatible with
74it. If you have at least python 2.6 then use <e>portage-2.1.9.24.tar.bz2</e>. If 76it. If you have at least python 2.6 then use <e>portage-&stable_version;.tar.bz2</e>. If
75you have python 2.4 or 2.5 then use <e>portage-2.1.6.tar.bz2</e>. 77you 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>
79Depending on the exact reason portage doesn't work for you anymore it may still 81Depending on the exact reason portage doesn't work for you anymore it may still
80be possible to use it to fetch the tarball for you, so as a first step please 82be possible to use it to fetch the tarball for you, so as a first step please
81try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't 83try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't
82work you have to manually fetch the tarball with: 84work 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>
90After that you should have the tarball available as 92After 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>
97<title>Replacing the installed version</title> 99<title>Replacing the installed version</title>
98<body> 100<body>
99 101
100<p> 102<p>
101The next step is to unpack the tarball to a temporary location, using 103The next step is to unpack the tarball to a temporary location, using
102<path>/root/portage-recover</path> as example the commands to do that are: 104<path>/root/portage-recover</path> as example the commands to do that are:
103</p> 105</p>
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>
113After you have done this it's just a matter of replacing the python and bash 115After you have done this it's just a matter of replacing the python and bash
114files of your existing installation with the ones from the tarball (in most 116files of your existing installation with the ones from the tarball (in most
115cases anyway). To do so please run: 117cases 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>
125If you are not using Gentoo on FreeBSD then you should remove the sed wrapper 127If you are not using Gentoo on FreeBSD then you should remove the sed wrapper
126script since it's not needed and it is known to cause problems with old 128script since it's not needed and it is known to cause problems with old
127versions of bash: 129versions of bash:
128</p> 130</p>
129 131
130<pre caption="Removing the sed wrapper script"> 132<pre caption="Removing the sed wrapper script">
131# <i>rm -f /usr/lib/portage/bin/sed</i> 133# <i>rm -f /usr/lib/portage/bin/sed</i>
132</pre> 134</pre>
133 135
134<note> 136<note>

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20