| 1 |
genone |
1.1 |
<?xml version='1.0' encoding="UTF-8"?>
|
| 2 |
|
|
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
|
| 3 |
|
|
<guide link="/proj/en/portage/doc/manually-fixing-portage.xml">
|
| 4 |
|
|
<title>Manually fixing broken portage installations</title>
|
| 5 |
|
|
<author>
|
| 6 |
|
|
<mail link="genone@gentoo.org">Marius Mauch</mail>
|
| 7 |
|
|
</author>
|
| 8 |
|
|
|
| 9 |
|
|
<abstract>
|
| 10 |
|
|
This document attempts to help people to manually fix a broken sys-apps/portage
|
| 11 |
|
|
installation.
|
| 12 |
|
|
</abstract>
|
| 13 |
|
|
|
| 14 |
|
|
<license/>
|
| 15 |
|
|
|
| 16 |
|
|
<version>0.1</version>
|
| 17 |
|
|
<date>19 Feb 2006</date>
|
| 18 |
|
|
|
| 19 |
|
|
<chapter>
|
| 20 |
|
|
<title>Manually fixing portage</title>
|
| 21 |
|
|
|
| 22 |
|
|
<section>
|
| 23 |
|
|
<title>Purpose</title>
|
| 24 |
|
|
<body>
|
| 25 |
|
|
<p>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
|
| 27 |
|
|
with great care, so please follow the listed steps exactly (but apply common sense
|
| 28 |
|
|
when necessary).</p>
|
| 29 |
|
|
</body>
|
| 30 |
|
|
</section>
|
| 31 |
|
|
|
| 32 |
|
|
<section>
|
| 33 |
|
|
<title>Getting a portage tarball</title>
|
| 34 |
|
|
<body>
|
| 35 |
|
|
<p>The first step to do is to get the tarball of a current portage version. In
|
| 36 |
|
|
the following text we will use <e>portage-2.0.54</e> as an example (as this
|
| 37 |
|
|
is the current stable version at the time of this writing), please replace that
|
| 38 |
|
|
with a version present in the tree.</p>
|
| 39 |
|
|
<p>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
|
| 41 |
|
|
try to run <c>emerge --fetchonly sys-apps/portage</c>, only if that doesn't work
|
| 42 |
|
|
you have to manually fetch the tarball with:</p>
|
| 43 |
|
|
<pre caption="fetching portage tarball with wget">
|
| 44 |
|
|
wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.0.54.tar.bz2
|
| 45 |
|
|
</pre>
|
| 46 |
|
|
<p>After that you should have the tarball available as
|
| 47 |
|
|
<path>/usr/portage/distfiles/portage-2.0.54.tar.bz2</path>.</p>
|
| 48 |
|
|
</body>
|
| 49 |
|
|
</section>
|
| 50 |
|
|
|
| 51 |
|
|
<section>
|
| 52 |
|
|
<title>Replacing the installed version</title>
|
| 53 |
|
|
<body>
|
| 54 |
|
|
<p>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>
|
| 56 |
|
|
<pre caption="unpacking portage tarball">
|
| 57 |
|
|
cd /root
|
| 58 |
|
|
mkdir portage-recover
|
| 59 |
|
|
cd portage-recover
|
| 60 |
|
|
tar xfj /usr/portage/distfiles/portage-2.0.54.tar.bz2
|
| 61 |
|
|
</pre>
|
| 62 |
|
|
<p>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
|
| 64 |
|
|
anyway). To do so please run:</p>
|
| 65 |
|
|
<pre caption="replacing installed files">
|
| 66 |
|
|
cd /root/portage-recover/portage-2.0.54
|
| 67 |
|
|
cp -R pym bin /usr/lib/portage/
|
| 68 |
|
|
</pre>
|
| 69 |
|
|
<p>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
|
| 71 |
|
|
immediately.</p>
|
| 72 |
|
|
<p>If these steps didn't work for you your problem is likely not a broken portage
|
| 73 |
|
|
installation but something else beyond the scope of this document. Please recheck
|
| 74 |
|
|
the <uri link="common-problems.xml">list of common problems</uri> and also look
|
| 75 |
|
|
in <uri link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported
|
| 76 |
|
|
there.</p>
|
| 77 |
|
|
</body>
|
| 78 |
|
|
</section>
|
| 79 |
|
|
|
| 80 |
|
|
</chapter>
|
| 81 |
|
|
|
| 82 |
|
|
</guide>
|