/[gentoo]/xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml
Gentoo

Diff of /xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.14
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?> 2
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml,v 1.14 2005/07/02 09:53:51 swift Exp $ -->
3 4
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 5<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 6
6<guide link="/doc/lang/new-upgrade-to-gentoo-1.4.xml"> 7<guide link="new-upgrade-to-gentoo-1.4.xml">
7 8
8<title>Gentoo 1.4 Upgrade Guide</title> 9<title>Gentoo 1.4 Upgrade Guide</title>
9 10
10 <author title = "Author"> 11<author title="Author">
11<mail link = "rac@gentoo.org">Robert Coie</mail> 12 <mail link="rac@gentoo.org">Robert Coie</mail>
12</author> 13</author>
13 14
14 <author title = "Copy Editor"> 15<author title="Copy Editor">
15<mail link = "avenj@gentoo.org">Jon Portnoy</mail> 16 <mail link="avenj@gentoo.org">Jon Portnoy</mail>
16</author> 17</author>
17 18
18 <version>0.1</version>
19 <date>3 March 2003</date>
20
21 <license/>
22
23 <abstract>A method for upgrading older Gentoo installations in place to Gentoo 1.4</abstract> 19<abstract>A method for upgrading older Gentoo installations in place to Gentoo 1.4</abstract>
24 20
21<!-- The content of this document is licensed under the CC-BY-SA license -->
22<!-- See http://creativecommons.org/licenses/by-sa/2.0 -->
23<license/>
24
25<version>0.4</version>
26<date>2005-07-02</date>
27
25 <chapter> 28<chapter>
26 <title>Before you begin</title> 29<title>Before you begin</title>
27 <section> 30<section>
28 <title>Be prepared</title> 31<title>Be prepared</title>
29 <body> 32<body>
30 <p>As with any major upgrade to the core of your Gentoo 33
31 system, there is always the possibility that unforeseen 34<p>
32 problems will ensue. It is always prudent to back up all 35As with any major upgrade to the core of your Gentoo system, there is always the
36possibility that unforeseen problems will ensue. It is always prudent to back
33 important data before beginning this process. If possible, 37up all important data before beginning this process. If possible, try to
34 try to allocate a large block of time for this upgrade, so 38allocate a large block of time for this upgrade, so that you will not feel
35 that you will not feel rushed. All the software on your 39rushed. All the software on your machine will need to be recompiled.
36 machine will need to be recompiled.</p> 40</p>
41
37 </body> 42</body>
38 </section> 43</section>
39 <section> 44<section>
40 <title>Other options</title> 45<title>Other options</title>
41 <body> 46<body>
47
48<p>
42 <p>This is not the only way to upgrade your system. You can 49This is not the only way to upgrade your system. You can install a new 1.4
43 install a new 1.4 system onto a separate partition and 50system onto a separate partition and reuse some of your system configuration
44 reuse some of your system configuration instead. This method also has 51instead. This method also has the advantage that you can always go back to your
45 the advantage that you can always go back to your old system
46 in the meantime as a fallback. You may also decide to simply 52old system in the meantime as a fallback. You may also decide to simply not
47 not upgrade your system. If you decide you want to upgrade 53upgrade your system. If you decide you want to upgrade in place, read on.
48 in place, read on.</p> 54</p>
55
49 </body> 56</body>
50 </section> 57</section>
51 <section> 58<section>
52 <title>General notes</title> 59<title>General notes</title>
53 <body> 60<body>
54 <p>Whenever the code listings suggest running the 61
55 <c>emerge</c> command, it is always a good idea to make a test 62<p>
56 run of the command using the <c>-p</c> or <c>--pretend</c> 63Whenever the code listings suggest running the <c>emerge</c> command, it is
64always a good idea to make a test run of the command using the <c>-p</c> or
57 option to make sure that the command will do what you expect 65<c>--pretend</c> option to make sure that the command will do what you expect it
58 it to do.</p> 66to do.
67</p>
68
59 </body> 69</body>
60 </section> 70</section>
61 </chapter> 71</chapter>
62 <chapter> 72<chapter>
63 <title>Upgrading in place</title> 73<title>Upgrading in place</title>
64 <section> 74<section>
65 <title>Get Portage as current as possible</title> 75<title>Get Portage as current as possible</title>
66 <body> 76<body>
77
78<p>
67 <p>Some of the syntax of current ebuilds is unreadable by 79Some of the syntax of current ebuilds is unreadable by older versions of
68 older versions of Portage. If you don't have at least Portage 2.0.44, try upgrading Portage.</p> 80Portage. If you don't have at least Portage 2.0.44, try upgrading Portage.
69 <pre> 81</p>
82
83<pre caption="Updating Portage">
70# <i>emerge sync</i> 84# <i>emerge --sync</i>
71# <i>emerge -u portage</i> 85# <i>emerge -u portage</i>
72</pre> 86</pre>
73 <note>If your Portage version is very old, you may get an 87
74 error message containing the phrase "unscriptable object". 88<note>
75 Read and follow the instructions in 89If your Portage version is very old, you may get an error message containing the
90phrase "unscriptable object". Read and follow the instructions in
76 <path>/usr/portage/sys-apps/portage/files/README.RESCUE</path>. 91<path>/usr/portage/sys-apps/portage/files/README.RESCUE</path>. Your Portage
77 Your Portage install should then be 92install should then be current.
78 current.</note> 93</note>
79</body></section>
80 94
95</body>
96</section>
81 <section> 97<section>
82 <title>Preparing GCC for cohabitation</title> 98<title>Preparing GCC for cohabitation</title>
83 <body> 99<body>
100
101<p>
84 <p>You will be installing a newer version of GCC during this 102You will be installing a newer version of GCC during this upgrade. Versions of
85 upgrade. Versions of GCC older than 2.95.3-r8 are not 103GCC older than 2.95.3-r8 are not designed to have multiple versions of GCC
86 designed to have multiple versions of GCC installed. You must
87 therefore upgrade GCC to at least version 2.95.3-r8. This 104installed. You must therefore upgrade GCC to at least version 2.95.3-r8. This
88 will also have the beneficial side-effect of installing the 105will also have the beneficial side-effect of installing the <c>gcc-config</c>
89 <c>gcc-config</c> package on your system, which can be used to 106package on your system, which can be used to switch back and forth between
90 switch back and forth between various installed versions of 107various installed versions of GCC.
91 GCC.</p> 108</p>
92 109
93 <pre> 110<pre caption="Updating GCC">
94# <i>emerge -u gcc</i> 111# <i>emerge -u gcc</i>
95</pre> 112</pre>
96 113
114<p>
97 <p>You can now check to see if gcc-config is working properly:</p> 115You can now check to see if gcc-config is working properly:
98 <pre> 116</p>
117
118<pre caption="Verifying GCC profile">
99# <c>gcc-config --get-current-profile</c> 119# <i>gcc-config --get-current-profile</i>
120</pre>
121
122<p>
123This should return i686-pc-linux-gnu-2.95.3 on most x86 systems. Older systems
124may return i586-pc-linux-gnu-2.95.3.
100</pre> 125</p>
101 <p>This should return i686-pc-linux-gnu-2.95.3 on most x86 systems. Older systems may return i586-pc-linux-gnu-2.95.3.</p> 126
102 </body> 127</body>
103 </section> 128</section>
104 <section> 129<section>
105 <title>Installing GCC 3</title> 130<title>Installing GCC 3</title>
106 <body> 131<body>
132
133<p>
107 <p>Now you can install a newer version of GCC without damaging 134Now you can install a newer version of GCC without damaging your current
108 your current compiler. Look in
109 <path>/usr/portage/sys-devel/gcc</path> for a version of the 135compiler. Look in <path>/usr/portage/sys-devel/gcc</path> for a version of the
110 GCC ebuild that is at least 3.2.1-r6. Choose the highest 136GCC ebuild that is at least 3.2.1-r6. Choose the highest version that is marked
111 version that is marked stable for your architecture. To see 137stable for your architecture. To see if an ebuild is considered stable for your
112 if an ebuild is considered stable for your architecture, look
113 for the KEYWORDS line in the ebuild file. If it has your 138architecture, look for the KEYWORDS line in the ebuild file. If it has your
114 architecture listed without a ~ in front of it, it is 139architecture listed without a ~ in front of it, it is considered stable.
115 considered stable. Assuming 3.2.2 is the most current stable 140Assuming 3.2.2 is the most current stable version, we first need to remove the
116 version, then issue the following command:</p> 141glibc dependency from gcc.
142</p>
143
117<pre> 144<p>
145Edit <path>/usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</path> and search for the
146line containing <c>DEPEND</c>. Remove the <c>glibc</c> dependency and save the
147ebuild.
148</p>
149
150<pre caption="Editing gcc-3.2.2.ebuild">
118# <i>emerge /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i> 151# <i>vim /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i>
152</pre>
153
154<p>
155Now install the latest GCC version on your system:
119</pre> 156</p>
157
158<pre caption="Install the latest GCC">
159# <i>USE="-java" emerge /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i>
160</pre>
161
120 </body> 162</body>
121 </section> 163</section>
122 <section> 164<section>
123 <title>Changing profiles</title> 165<title>Changing profiles</title>
124 <body> 166<body>
125 <p>Now you need to change two sets of profiles: your 167
126 gcc-config profile and your Portage profile.</p> 168<p>
127 <pre> 169Now you need to change two sets of profiles: your gcc-config profile and your
170Portage profile.
171</p>
172
173<pre caption="Change the Portage profile">
128# <i>cd /etc</i> 174# <i>cd /etc</i>
129# <i>rm make.profile</i> 175# <i>rm make.profile</i>
130# <i>ln -s ../usr/portage/profiles/default-x86-1.4 make.profile</i> <codenote>Replace "x86" with your architecture</codenote> 176<comment>(Replace "x86" with your architecture)</comment>
177# <i>ln -s ../usr/portage/profiles/default-x86-1.4 make.profile</i>
131</pre> 178</pre>
132 179
133 <pre> 180<pre caption="Change the GCC profile">
134# <i>gcc-config --list-profiles</i> <codenote>Note the one for the version you just emerged, use it below</codenote> 181<comment>(Note the one for the version you just emerged, use it below)</comment>
135# <i>gcc-config i686-pc-linux-gnu-3.2.2</i> <codenote>Replace with the version you noted above</codenote> 182# <i>gcc-config --list-profiles</i>
183<comment>(Replace with the version you noted above)</comment>
184# <i>gcc-config i686-pc-linux-gnu-3.2.2</i>
136</pre> 185</pre>
186
137 </body> 187</body>
138 </section> 188</section>
139 <section> 189<section>
140 <title>Recompile toolchain</title> 190<title>Recompile toolchain</title>
141 <body> 191<body>
192
193<p>
142 <p>Now you need to recompile your core toolchain with your new 194Now you need to recompile your core toolchain with your new compiler. If you
143 compiler. If you are continuing in the same shell, you need 195are continuing in the same shell, you need to run <c>source /etc/profile</c> as
144 to run <c>source /etc/profile</c> as gcc-config instructed you
145 to. Then emerge glibc and binutils using your new 196gcc-config instructed you to. Then emerge glibc and binutils using your new
146 compiler:</p> 197compiler:
147<pre> 198</p>
199
200<pre caption="Rebuilding the toolchain">
148# <i>emerge glibc binutils</i> 201# <i>emerge glibc binutils</i>
149</pre> 202</pre>
203
204<warn>
150 <warn>It is quite likely that you will upgrade glibc from a 205It is quite likely that you will upgrade glibc from a 2.2 or older version to
151 2.2 or older version to 2.3. Do not downgrade glibc 2062.3. Do not downgrade glibc afterwards. Any software you have compiled against
152 afterwards. Any software you have compiled against glibc 2.3
153 will stop working, and this can make your system 207glibc 2.3 will stop working, and this can make your system unusable.
154 unusable.</warn> 208</warn>
209
155 </body> 210</body>
156 </section> 211</section>
157 <section> 212<section>
158 <title>Recompiling everything with your new compiler</title> 213<title>Recompiling everything with your new compiler</title>
214<body>
215
216<p>
159 <body><p>Now you may recompile everything on your system with 217Now you may recompile everything on your system with your new compiler:
160 your new compiler:</p> 218</p>
161<pre> 219
220<pre caption="Rebuilding the entire system">
162# <i>emerge -e world</i> 221# <i>emerge -e world</i>
163</pre> 222</pre>
223
224<note>
164 <note>If this command fails at any point due to errors, you 225If this command fails at any point due to errors, you
165 can use <c>emerge --resume</c> to continue the process where 226can use <c>emerge --resume</c> to continue the process where
166 you left off. This requires Portage 2.0.47 or later.</note> 227you left off. This requires Portage 2.0.47 or later.
228</note>
229
167 </body> 230</body>
168 </section> 231</section>
169 </chapter> 232</chapter>
170</guide> 233</guide>
171
172
173

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20