/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-portage.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-portage.xml

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

Revision 1.44 Revision 1.51
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.44 2004/11/15 12:47:47 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 10
11<version>1.42</version> 11<version>1.46</version>
12<date>October 24, 2004</date> 12<date>2005-05-17</date>
13 13
14<section> 14<section>
15<title>Welcome to Portage</title> 15<title>Welcome to Portage</title>
16<body> 16<body>
17 17
66<title>Updating the Portage Tree</title> 66<title>Updating the Portage Tree</title>
67<body> 67<body>
68 68
69<p> 69<p>
70The Portage tree is usually updated with <uri 70The Portage tree is usually updated with <uri
71link="http://rsync.gentoo.org">rsync</uri>, a fast incremental file transfer 71link="http://rsync.samba.org/">rsync</uri>, a fast incremental file transfer
72utility. Updating is fairly simple as the <c>emerge</c> command provides a 72utility. Updating is fairly simple as the <c>emerge</c> command provides a
73front-end for rsync: 73front-end for rsync:
74</p> 74</p>
75 75
76<pre caption="Updating the Portage tree"> 76<pre caption="Updating the Portage tree">
97<title>Searching for Software</title> 97<title>Searching for Software</title>
98<body> 98<body>
99 99
100<p> 100<p>
101To search through the Portage tree after software titles, you can use 101To search through the Portage tree after software titles, you can use
102<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>
103returns the names of packages whose title matches (either fully or partially) 103returns the names of packages whose title matches (either fully or partially)
104the given search term. 104the given search term.
105</p> 105</p>
106 106
107<p> 107<p>
108For instance, to search for all packages who have "pdf" in their name: 108For instance, to search for all packages who have "pdf" in their name:
109</p> 109</p>
110 110
111<pre caption="Searching for pdf-named packages"> 111<pre caption="Searching for pdf-named packages">
112$ <i>emerge search pdf</i> 112$ <i>emerge --search pdf</i>
113</pre> 113</pre>
114 114
115<p> 115<p>
116If you want to search through the descriptions as well you can use the 116If you want to search through the descriptions as well you can use the
117<c>--searchdesc</c> (or <c>-S</c>) switch: 117<c>--searchdesc</c> (or <c>-S</c>) switch:
125When you take a look at the output, you'll notice that it gives you a lot of 125When you take a look at the output, you'll notice that it gives you a lot of
126information. The fields are clearly labelled so we won't go further into their 126information. The fields are clearly labelled so we won't go further into their
127meanings: 127meanings:
128</p> 128</p>
129 129
130<pre caption="Example emerge search output"> 130<pre caption="Example 'emerge --search' output">
131* net-print/cups-pdf 131* net-print/cups-pdf
132 Latest version available: 1.5.2 132 Latest version available: 1.5.2
133 Latest version installed: [ Not Installed ] 133 Latest version installed: [ Not Installed ]
134 Size of downloaded files: 15 kB 134 Size of downloaded files: 15 kB
135 Homepage: http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/ 135 Homepage: http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/
183<title>Removing Software</title> 183<title>Removing Software</title>
184<body> 184<body>
185 185
186<p> 186<p>
187When you want to remove a software package from your system, use <c>emerge 187When you want to remove a software package from your system, use <c>emerge
188unmerge</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
189package from your system <e>except</e> the configuration files of that 189package from your system <e>except</e> the configuration files of that
190application if you have altered those after the installation. Leaving the 190application if you have altered those after the installation. Leaving the
191configuration files allows you to continue working with the package if you ever 191configuration files allows you to continue working with the package if you ever
192decide to install it again. 192decide to install it again.
193</p> 193</p>
198warn you when you want to remove an important package that breaks your system 198warn you when you want to remove an important package that breaks your system
199if you unmerge it. 199if you unmerge it.
200</p> 200</p>
201 201
202<pre caption="Removing gnumeric from the system"> 202<pre caption="Removing gnumeric from the system">
203# <i>emerge unmerge gnumeric</i> 203# <i>emerge --unmerge gnumeric</i>
204</pre> 204</pre>
205 205
206<p> 206<p>
207When you remove a package from your system, the dependencies of that package 207When you remove a package from your system, the dependencies of that package
208that were installed automatically when you installed the software are left. To 208that were installed automatically when you installed the software are left. To
209have Portage locate all dependencies that can now be removed, use 209have Portage locate all dependencies that can now be removed, use
210<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
211on.
211</p> 212</p>
212 213
213</body> 214</body>
214</subsection> 215</subsection>
215<subsection> 216<subsection>
251</pre> 252</pre>
252 253
253</body> 254</body>
254</subsection> 255</subsection>
255<subsection> 256<subsection>
256<title>Stub Packages</title> 257<title>Metapackages</title>
257<body> 258<body>
258 259
259<p> 260<p>
260Some packages in the Portage tree don't have any real content but are used to 261Some packages in the Portage tree don't have any real content but are used to
261install a collection of packages. For instance, the <c>kde</c> package will 262install a collection of packages. For instance, the <c>kde</c> package will
263KDE-related packages as dependencies. 264KDE-related packages as dependencies.
264</p> 265</p>
265 266
266<p> 267<p>
267If you ever want to remove such a package from your system, running <c>emerge 268If you ever want to remove such a package from your system, running <c>emerge
268unmerge</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
269the system. 270on the system.
270</p> 271</p>
271 272
272<p> 273<p>
273Portage has the functionality to remove orphaned dependencies as well, but since 274Portage has the functionality to remove orphaned dependencies as well, but since
274the availability of software is dynamically dependent you first need to update 275the availability of software is dynamically dependent you first need to update
275your entire system fully, including the new changes you applied when changing 276your entire system fully, including the new changes you applied when changing
276USE flags. After this you can run <c>emerge depclean</c> to remove the orphaned 277USE flags. After this you can run <c>emerge --depclean</c> to remove the
277dependencies. When this is done, you need to rebuild the applications that were 278orphaned dependencies. When this is done, you need to rebuild the applications
278dynamically linked to the now-removed software titles but don't require them 279that were dynamically linked to the now-removed software titles but don't
279anymore. 280require them anymore.
280</p> 281</p>
281 282
282<p> 283<p>
283All this is handled with the following three commands: 284All this is handled with the following three commands:
284</p> 285</p>
285 286
286<pre caption="Removing orphaned dependencies"> 287<pre caption="Removing orphaned dependencies">
287# <i>emerge --update --deep --newuse world</i> 288# <i>emerge --update --deep --newuse world</i>
288# <i>emerge depclean</i> 289# <i>emerge --depclean</i>
289# <i>revdep-rebuild</i> 290# <i>revdep-rebuild</i>
290</pre> 291</pre>
291 292
292<p> 293<p>
293<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
308<body> 309<body>
309 310
310<p> 311<p>
311As we stated before, Portage is extremely powerful and supports many features 312As we stated before, Portage is extremely powerful and supports many features
312that other software management tools lack. To understand this, we explain a few 313that other software management tools lack. To understand this, we explain a few
313aspects of Portage without going in too much detail. 314aspects of Portage without going into too much detail.
314</p> 315</p>
315 316
316<p> 317<p>
317With Portage different versions of a single package can coexist on a system. 318With Portage different versions of a single package can coexist on a system.
318While other distributions tend to name their package to those versions (like 319While other distributions tend to name their package to those versions (like
444<subsection id="missingdependencies"> 445<subsection id="missingdependencies">
445<title>Missing Dependencies</title> 446<title>Missing Dependencies</title>
446<body> 447<body>
447 448
448<pre caption="Portage warning about missing dependency"> 449<pre caption="Portage warning about missing dependency">
449emerge: there are no ebuilds to satisfy "&gt;=sys-devel/gcc-4.2-r4". 450emerge: there are no ebuilds to satisfy "&gt;=sys-devel/gcc-3.4.2-r4".
450 451
451!!! Problem with ebuild sys-devel/gcc-3.4.2-r2 452!!! Problem with ebuild sys-devel/gcc-3.4.2-r2
452!!! Possibly a DEPEND/*DEPEND problem. 453!!! Possibly a DEPEND/*DEPEND problem.
453</pre> 454</pre>
454 455

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.20