| … | |
… | |
| 31 | |
31 | |
| 32 | <section> |
32 | <section> |
| 33 | <title>Getting a portage tarball</title> |
33 | <title>Getting a portage tarball</title> |
| 34 | <body> |
34 | <body> |
| 35 | <p>The first step to do is to get the tarball of a current portage version. In |
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 |
36 | the following text we will use <e>portage-2.1</e> as an example (as this |
| 37 | is the current stable version at the time of this writing), please replace that |
37 | is the current stable version at the time of this writing), please replace that |
| 38 | with a version present in the tree.</p> |
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 |
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 |
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 |
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> |
42 | you have to manually fetch the tarball with:</p> |
| 43 | <pre caption="fetching portage tarball with wget"> |
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 |
44 | wget -P /usr/portage/distfiles http://distfiles.gentoo.org/distfiles/portage-2.1.tar.bz2 |
| 45 | </pre> |
45 | </pre> |
| 46 | <p>After that you should have the tarball available as |
46 | <p>After that you should have the tarball available as |
| 47 | <path>/usr/portage/distfiles/portage-2.0.54.tar.bz2</path>.</p> |
47 | <path>/usr/portage/distfiles/portage-2.1.tar.bz2</path>.</p> |
| 48 | </body> |
48 | </body> |
| 49 | </section> |
49 | </section> |
| 50 | |
50 | |
| 51 | <section> |
51 | <section> |
| 52 | <title>Replacing the installed version</title> |
52 | <title>Replacing the installed version</title> |
| … | |
… | |
| 55 | <path>/root/portage-recover</path> as example the commands to do that are:</p> |
55 | <path>/root/portage-recover</path> as example the commands to do that are:</p> |
| 56 | <pre caption="unpacking portage tarball"> |
56 | <pre caption="unpacking portage tarball"> |
| 57 | cd /root |
57 | cd /root |
| 58 | mkdir portage-recover |
58 | mkdir portage-recover |
| 59 | cd portage-recover |
59 | cd portage-recover |
| 60 | tar xfj /usr/portage/distfiles/portage-2.0.54.tar.bz2 |
60 | tar xfj /usr/portage/distfiles/portage-2.1.tar.bz2 |
| 61 | </pre> |
61 | </pre> |
| 62 | <p>After you have done this it's just a matter of replacing the python and bash |
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 |
63 | files of your existing installation with the ones from the tarball (in most cases |
| 64 | anyway). To do so please run:</p> |
64 | anyway). To do so please run:</p> |
| 65 | <pre caption="replacing installed files"> |
65 | <pre caption="replacing installed files"> |
| 66 | cd /root/portage-recover/portage-2.0.54 |
66 | cd /root/portage-recover/portage-2.1 |
| 67 | cp -R pym bin /usr/lib/portage/ |
67 | cp -R pym bin /usr/lib/portage/ |
| 68 | </pre> |
68 | </pre> |
| 69 | <p>Now you should have a working portage install again. To ensure a consistent |
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 |
70 | system state however you should now run <c>emerge sys-apps/portage</c> again |
| 71 | immediately.</p> |
71 | immediately.</p> |