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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.5 - (hide annotations) (download) (as text)
Wed Jan 31 07:04:43 2007 UTC (7 years, 5 months ago) by zmedico
Branch: MAIN
Changes since 1.4: +5 -5 lines
File MIME type: application/xml
Update portage version from 2.1 to 2.1.1.

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>
9     <abstract>
10     This document attempts to help people to manually fix a broken sys-apps/portage
11     installation.
12     </abstract>
14     <license/>
16     <version>0.1</version>
17     <date>19 Feb 2006</date>
19     <chapter>
20     <title>Manually fixing portage</title>
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>
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 zmedico 1.5 the following text we will use <e>portage-2.1.1</e> as an example (as this
37 genone 1.1 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 zmedico 1.5 wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.1.1.tar.bz2
45 genone 1.1 </pre>
46     <p>After that you should have the tarball available as
47 zmedico 1.5 <path>/usr/portage/distfiles/portage-2.1.1.tar.bz2</path>.</p>
48 genone 1.1 </body>
49     </section>
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 zmedico 1.5 tar xfj /usr/portage/distfiles/portage-2.1.1.tar.bz2
61 genone 1.1 </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 zmedico 1.5 cd /root/portage-recover/portage-2.1.1
67 genone 1.1 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 genone 1.4 <p>If you get a <c>command not found</c> error message when you try to run
73     <c>emerge</c> you have to recreate the symlink:</p>
74     <pre caption="recreating the emerge symlink">
75     ln -s ../lib/portage/bin/emerge /usr/bin/emerge
76     </pre>
77 genone 1.1 <p>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
79     the <uri link="common-problems.xml">list of common problems</uri> and also look
80     in <uri link="http://bugs.gentoo.org">bugzilla</uri> if the problem is reported
81     there.</p>
82     </body>
83     </section>
85     </chapter>
87     </guide>

  ViewVC Help
Powered by ViewVC 1.1.20