/[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.5 Revision 1.6
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>
10This 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
11installation. 15installation.
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 32This section will tell you how to manually update/fix your portage installation
26in case you can't run <c>emerge sys-apps/portage</c>. While not hard it is still to be done 33in case you can't run <c>emerge sys-apps/portage</c>. While not hard it is
27with great care, so please follow the listed steps exactly (but apply common sense 34still to be done with great care, so please follow the listed steps exactly
28when 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 45The first step to do is to get the tarball of a current portage version. In the
36the following text we will use <e>portage-2.1.1</e> as an example (as this 46following text we will use <e>portage-2.1.1</e> as an example (as this is the
37is the current stable version at the time of this writing), please replace that 47current stable version at the time of this writing), please replace that with a
38with a version present in the tree.</p> 48version 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 52Depending on the exact reason portage doesn't work for you anymore it may still
40be possible to use it to fetch the tarball for you, so as a first step please 53be possible to use it to fetch the tarball for you, so as a first step please
41try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't work 54try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't
42you have to manually fetch the tarball with:</p> 55work 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">
44wget -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 63After 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 74The 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">
57cd /root 79# <i>cd /root</i>
58mkdir portage-recover 80# <i>mkdir portage-recover</i>
59cd portage-recover 81# <i>cd portage-recover</i>
60tar 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 86After you have done this it's just a matter of replacing the python and bash
63files of your existing installation with the ones from the tarball (in most cases 87files of your existing installation with the ones from the tarball (in most
64anyway). To do so please run:</p> 88cases anyway). To do so please run:
89</p>
90
65<pre caption="replacing installed files"> 91<pre caption="Replacing installed files">
66cd /root/portage-recover/portage-2.1.1 92# <i>cd /root/portage-recover/portage-2.1.1</i>
67cp -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 97Now you should have a working portage install again. To ensure a consistent
70system state however you should now run <c>emerge sys-apps/portage</c> again 98system state however you should now run <c>emerge sys-apps/portage</c> again
71immediately.</p> 99immediately.
100</p>
101
102<p>
72<p>If you get a <c>command not found</c> error message when you try to run 103If 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">
75ln -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 112If these steps didn't work for you your problem is likely not a broken portage
78installation but something else beyond the scope of this document. Please recheck 113installation but something else beyond the scope of this document. Please
79the <uri link="common-problems.xml">list of common problems</uri> and also look 114recheck the <uri link="/proj/en/portage/doc/common-problems.xml">list of common
115problems</uri> and also look in <uri
80in <uri link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported 116link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported there.
81there.</p> 117</p>
118
82</body> 119</body>
83</section> 120</section>
84
85</chapter> 121</chapter>
86
87</guide> 122</guide>

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20