| … | |
… | |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.40 2004/10/21 16:34:46 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.51 2005/05/17 14:39:26 neysx Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
|
|
10 | |
|
|
11 | <version>1.46</version> |
|
|
12 | <date>2005-05-17</date> |
|
|
13 | |
| 10 | <section> |
14 | <section> |
| 11 | <title>Welcome to Portage</title> |
15 | <title>Welcome to Portage</title> |
| 12 | <body> |
16 | <body> |
| 13 | |
17 | |
| 14 | <p> |
18 | <p> |
| … | |
… | |
| 62 | <title>Updating the Portage Tree</title> |
66 | <title>Updating the Portage Tree</title> |
| 63 | <body> |
67 | <body> |
| 64 | |
68 | |
| 65 | <p> |
69 | <p> |
| 66 | The Portage tree is usually updated with <uri |
70 | The Portage tree is usually updated with <uri |
| 67 | link="http://rsync.gentoo.org">rsync</uri>, a fast incremental file transfer |
71 | link="http://rsync.samba.org/">rsync</uri>, a fast incremental file transfer |
| 68 | utility. Updating is fairly simple as the <c>emerge</c> command provides a |
72 | utility. Updating is fairly simple as the <c>emerge</c> command provides a |
| 69 | front-end for rsync: |
73 | front-end for rsync: |
| 70 | </p> |
74 | </p> |
| 71 | |
75 | |
| 72 | <pre caption="Updating the Portage tree"> |
76 | <pre caption="Updating the Portage tree"> |
| … | |
… | |
| 93 | <title>Searching for Software</title> |
97 | <title>Searching for Software</title> |
| 94 | <body> |
98 | <body> |
| 95 | |
99 | |
| 96 | <p> |
100 | <p> |
| 97 | To search through the Portage tree after software titles, you can use |
101 | To search through the Portage tree after software titles, you can use |
| 98 | <c>emerge</c> built-in search capabilities. By default, <c>emerge search</c> |
102 | <c>emerge</c> built-in search capabilities. By default, <c>emerge --search</c> |
| 99 | returns package names whos title corresponds with (either fully or partially) |
103 | returns the names of packages whose title matches (either fully or partially) |
| 100 | the given search term. |
104 | the given search term. |
| 101 | </p> |
105 | </p> |
| 102 | |
106 | |
| 103 | <p> |
107 | <p> |
| 104 | For instance, to search for all packages who have "pdf" in their name: |
108 | For instance, to search for all packages who have "pdf" in their name: |
| 105 | </p> |
109 | </p> |
| 106 | |
110 | |
| 107 | <pre caption="Searching for pdf-named packages"> |
111 | <pre caption="Searching for pdf-named packages"> |
| 108 | $ <i>emerge search pdf</i> |
112 | $ <i>emerge --search pdf</i> |
| 109 | </pre> |
113 | </pre> |
| 110 | |
114 | |
| 111 | <p> |
115 | <p> |
| 112 | If you want to search through the descriptions as well you can use the |
116 | If you want to search through the descriptions as well you can use the |
| 113 | <c>--searchdesc</c> (or <c>-S</c>) switch: |
117 | <c>--searchdesc</c> (or <c>-S</c>) switch: |
| … | |
… | |
| 121 | When you take a look at the output, you'll notice that it gives you a lot of |
125 | When you take a look at the output, you'll notice that it gives you a lot of |
| 122 | information. The fields are clearly labelled so we won't go further into their |
126 | information. The fields are clearly labelled so we won't go further into their |
| 123 | meanings: |
127 | meanings: |
| 124 | </p> |
128 | </p> |
| 125 | |
129 | |
| 126 | <pre caption="Example emerge search output"> |
130 | <pre caption="Example 'emerge --search' output"> |
| 127 | * net-print/cups-pdf |
131 | * net-print/cups-pdf |
| 128 | Latest version available: 1.5.2 |
132 | Latest version available: 1.5.2 |
| 129 | Latest version installed: [ Not Installed ] |
133 | Latest version installed: [ Not Installed ] |
| 130 | Size of downloaded files: 15 kB |
134 | Size of downloaded files: 15 kB |
| 131 | Homepage: http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/ |
135 | Homepage: http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/ |
| … | |
… | |
| 179 | <title>Removing Software</title> |
183 | <title>Removing Software</title> |
| 180 | <body> |
184 | <body> |
| 181 | |
185 | |
| 182 | <p> |
186 | <p> |
| 183 | When you want to remove a software package from your system, use <c>emerge |
187 | When you want to remove a software package from your system, use <c>emerge |
| 184 | unmerge</c>. This will tell Portage to remove all files installed by that |
188 | --unmerge</c>. This will tell Portage to remove all files installed by that |
| 185 | package from your system <e>except</e> the configuration files of that |
189 | package from your system <e>except</e> the configuration files of that |
| 186 | application if you have altered those after the installation. Leaving the |
190 | application if you have altered those after the installation. Leaving the |
| 187 | configuration files allows you to continue working with the package if you ever |
191 | configuration files allows you to continue working with the package if you ever |
| 188 | decide to install it again. |
192 | decide to install it again. |
| 189 | </p> |
193 | </p> |
| … | |
… | |
| 194 | warn you when you want to remove an important package that breaks your system |
198 | warn you when you want to remove an important package that breaks your system |
| 195 | if you unmerge it. |
199 | if you unmerge it. |
| 196 | </p> |
200 | </p> |
| 197 | |
201 | |
| 198 | <pre caption="Removing gnumeric from the system"> |
202 | <pre caption="Removing gnumeric from the system"> |
| 199 | # <i>emerge unmerge gnumeric</i> |
203 | # <i>emerge --unmerge gnumeric</i> |
| 200 | </pre> |
204 | </pre> |
| 201 | |
205 | |
| 202 | <p> |
206 | <p> |
| 203 | When you remove a package from your system, the dependencies of that package |
207 | When you remove a package from your system, the dependencies of that package |
| 204 | that were installed automatically when you installed the software are left. To |
208 | that were installed automatically when you installed the software are left. To |
| 205 | have Portage locate all dependencies that can now be removed, use |
209 | have Portage locate all dependencies that can now be removed, use |
| 206 | <c>emerge</c>'s <c>depclean</c> functionality. We will talk about this later on. |
210 | <c>emerge</c>'s <c>--depclean</c> functionality. We will talk about this later |
|
|
211 | on. |
| 207 | </p> |
212 | </p> |
| 208 | |
213 | |
| 209 | </body> |
214 | </body> |
| 210 | </subsection> |
215 | </subsection> |
| 211 | <subsection> |
216 | <subsection> |
| … | |
… | |
| 247 | </pre> |
252 | </pre> |
| 248 | |
253 | |
| 249 | </body> |
254 | </body> |
| 250 | </subsection> |
255 | </subsection> |
| 251 | <subsection> |
256 | <subsection> |
| 252 | <title>Stub Packages</title> |
257 | <title>Metapackages</title> |
| 253 | <body> |
258 | <body> |
| 254 | |
259 | |
| 255 | <p> |
260 | <p> |
| 256 | Some packages in the Portage tree don't have any real content but are used to |
261 | Some packages in the Portage tree don't have any real content but are used to |
| 257 | install a collection of packages. For instance, the <c>kde</c> package will |
262 | install a collection of packages. For instance, the <c>kde</c> package will |
| … | |
… | |
| 259 | KDE-related packages as dependencies. |
264 | KDE-related packages as dependencies. |
| 260 | </p> |
265 | </p> |
| 261 | |
266 | |
| 262 | <p> |
267 | <p> |
| 263 | If you ever want to remove such a package from your system, running <c>emerge |
268 | If you ever want to remove such a package from your system, running <c>emerge |
| 264 | unmerge</c> on the package won't have much effect as the dependencies remain on |
269 | --unmerge</c> on the package won't have much effect as the dependencies remain |
| 265 | the system. |
270 | on the system. |
| 266 | </p> |
271 | </p> |
| 267 | |
272 | |
| 268 | <p> |
273 | <p> |
| 269 | Portage has the functionality to remove orphaned dependencies as well, but since |
274 | Portage has the functionality to remove orphaned dependencies as well, but since |
| 270 | the availability of software is dynamically dependent you first need to update |
275 | the availability of software is dynamically dependent you first need to update |
| 271 | your entire system fully, including the new changes you applied when changing |
276 | your entire system fully, including the new changes you applied when changing |
| 272 | USE flags. After this you can run <c>emerge depclean</c> to remove the orphaned |
277 | USE flags. After this you can run <c>emerge --depclean</c> to remove the |
| 273 | dependencies. When this is done, you need to rebuild the applications that were |
278 | orphaned dependencies. When this is done, you need to rebuild the applications |
| 274 | dynamically linked to the now-removed software titles but don't require them |
279 | that were dynamically linked to the now-removed software titles but don't |
| 275 | anymore. |
280 | require them anymore. |
| 276 | </p> |
281 | </p> |
| 277 | |
282 | |
| 278 | <p> |
283 | <p> |
| 279 | All this is handled with the following three commands: |
284 | All this is handled with the following three commands: |
| 280 | </p> |
285 | </p> |
| 281 | |
286 | |
| 282 | <pre caption="Removing orphaned dependencies"> |
287 | <pre caption="Removing orphaned dependencies"> |
| 283 | # <i>emerge --update --deep --newuse world</i> |
288 | # <i>emerge --update --deep --newuse world</i> |
| 284 | # <i>emerge depclean</i> |
289 | # <i>emerge --depclean</i> |
| 285 | # <i>revdep-rebuild</i> |
290 | # <i>revdep-rebuild</i> |
| 286 | </pre> |
291 | </pre> |
| 287 | |
292 | |
| 288 | <p> |
293 | <p> |
| 289 | <c>revdep-rebuild</c> is provided by the <c>gentoolkit</c> package; don't forget |
294 | <c>revdep-rebuild</c> is provided by the <c>gentoolkit</c> package; don't forget |
| … | |
… | |
| 304 | <body> |
309 | <body> |
| 305 | |
310 | |
| 306 | <p> |
311 | <p> |
| 307 | As we stated before, Portage is extremely powerful and supports many features |
312 | As we stated before, Portage is extremely powerful and supports many features |
| 308 | that other software management tools lack. To understand this, we explain a few |
313 | that other software management tools lack. To understand this, we explain a few |
| 309 | aspects of Portage without going in too much detail. |
314 | aspects of Portage without going into too much detail. |
| 310 | </p> |
315 | </p> |
| 311 | |
316 | |
| 312 | <p> |
317 | <p> |
| 313 | With Portage different versions of a single package can coexist on a system. |
318 | With Portage different versions of a single package can coexist on a system. |
| 314 | While other distributions tend to name their package to those versions (like |
319 | While other distributions tend to name their package to those versions (like |
| … | |
… | |
| 365 | !!! both can't be installed on the same system together. |
370 | !!! both can't be installed on the same system together. |
| 366 | !!! Please use 'emerge --pretend' to determine blockers. |
371 | !!! Please use 'emerge --pretend' to determine blockers. |
| 367 | </pre> |
372 | </pre> |
| 368 | |
373 | |
| 369 | <p> |
374 | <p> |
| 370 | Ebuilds contain specific fields that inform Portage about it's dependencies. |
375 | Ebuilds contain specific fields that inform Portage about its dependencies. |
| 371 | There are two possible dependencies: build dependencies, declared in |
376 | There are two possible dependencies: build dependencies, declared in |
| 372 | <c>DEPEND</c> and run-time dependencies, declared in <c>RDEPEND</c>. When one of |
377 | <c>DEPEND</c> and run-time dependencies, declared in <c>RDEPEND</c>. When one of |
| 373 | these dependencies explicitly marks a package or virtual as being <e>not</e> |
378 | these dependencies explicitly marks a package or virtual as being <e>not</e> |
| 374 | compatible, it triggers a blockage. |
379 | compatible, it triggers a blockage. |
| 375 | </p> |
380 | </p> |
| … | |
… | |
| 440 | <subsection id="missingdependencies"> |
445 | <subsection id="missingdependencies"> |
| 441 | <title>Missing Dependencies</title> |
446 | <title>Missing Dependencies</title> |
| 442 | <body> |
447 | <body> |
| 443 | |
448 | |
| 444 | <pre caption="Portage warning about missing dependency"> |
449 | <pre caption="Portage warning about missing dependency"> |
| 445 | emerge: there are no ebuilds to satisfy ">=sys-devel/gcc-4.2-r4". |
450 | emerge: there are no ebuilds to satisfy ">=sys-devel/gcc-3.4.2-r4". |
| 446 | |
451 | |
| 447 | !!! Problem with ebuild sys-devel/gcc-3.4.2-r2 |
452 | !!! Problem with ebuild sys-devel/gcc-3.4.2-r2 |
| 448 | !!! Possibly a DEPEND/*DEPEND problem. |
453 | !!! Possibly a DEPEND/*DEPEND problem. |
| 449 | </pre> |
454 | </pre> |
| 450 | |
455 | |