/[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.5 Revision 1.6
1<!-- The content of this document is licensed under the CC-BY-SA license --> 1<!-- The content of this document is licensed under the CC-BY-SA license -->
2<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 2<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
3 3
4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.5 2003/11/27 11:11:42 swift Exp $ --> 4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-portage.xml,v 1.6 2003/11/27 14:45:38 swift Exp $ -->
5 5
6<sections> 6<sections>
7<section> 7<section>
8<title>Obtaining Package Information</title> 8<title>Obtaining Package Information</title>
9<subsection> 9<subsection>
10<title>The Lord of All Tools: emerge</title> 10<title>The Lord of All Tools: emerge</title>
11<body> 11<body>
12 12
13<p> 13<p>
14The main Portage tool that most users will use is <c>emerge</c>. We have already 14The main Portage tool that most users will use is <c>emerge</c>. We have already
15used it during the Gentoo installation and in the previous chapter, but we just 15used it during the Gentoo installation and in the previous chapter, but we just
16briefly explained how to use it. This chapter will elaborate on <c>emerge</c> 16briefly explained how to use it. This chapter will elaborate on <c>emerge</c>
17and learn you how to use <c>emerge</c> to fix all your software-related needs. 17and learn you how to use <c>emerge</c> to fix all your software-related needs.
18</p> 18</p>
19 19
33 33
34<pre caption="Retrieving help for emerge"> 34<pre caption="Retrieving help for emerge">
35# <i>man emerge</i> 35# <i>man emerge</i>
36# <i>emerge --help</i> 36# <i>emerge --help</i>
37</pre> 37</pre>
38 38
39</body> 39</body>
40</subsection> 40</subsection>
41<subsection> 41<subsection>
42<title>The Portage Tree</title> 42<title>The Portage Tree</title>
43<body> 43<body>
44 44
45<p> 45<p>
46Before we continue describing <c>emerge</c>, let us first take a look at the 46Before we continue describing <c>emerge</c>, let us first take a look at the
47Portage Tree. Go to <path>/usr/portage</path> and do a listing of the available 47Portage Tree. Go to <path>/usr/portage</path> and do a listing of the available
48directories. 48directories. We use <c>ls --classify</c> to list the contents of a
49directory as it will show directories with a trailing "/".
49</p> 50</p>
50 51
51<pre caption="Viewing the Portage Tree"> 52<pre caption="Viewing the Portage Tree">
52# <i>cd /usr/portage; ls --classify</i> 53# <i>cd /usr/portage; ls --classify</i>
53<comment>(The --classify will append a special character to note the filetype)</comment>
54app-admin/ dev-ml/ gnome-libs/ net-print/ 54app-admin/ dev-ml/ gnome-libs/ net-print/
55app-arch/ dev-perl/ gnome-office/ net-wireless/ 55app-arch/ dev-perl/ gnome-office/ net-wireless/
56app-benchmarks/ dev-php/ header.txt net-www/ 56app-benchmarks/ dev-php/ header.txt net-www/
57app-cdr/ dev-python/ incoming/ net-zope/ 57app-cdr/ dev-python/ incoming/ net-zope/
58app-crypt/ dev-ruby/ jython/ packages/ 58app-crypt/ dev-ruby/ jython/ packages/
59app-dicts/ dev-tcltk/ kde-apps/ profiles/ 59app-dicts/ dev-tcltk/ kde-apps/ profiles/
60app-doc/ dev-tex/ kde-base/ releases/ 60app-doc/ dev-tex/ kde-base/ releases/
61app-editors/ dev-util/ kde-i18n/ scripts/ 61app-editors/ dev-util/ kde-i18n/ scripts/
62app-emacs/ distfiles/ kde-libs/ sec-policy/ 62app-emacs/ distfiles/ kde-libs/ sec-policy/
63app-emulation/ eclass/ licenses/ skel.ChangeLog 63app-emulation/ eclass/ licenses/ skel.ChangeLog
64app-games/ experimental/ media-fonts/ skel.ebuild 64app-games/ experimental/ media-fonts/ skel.ebuild
65app-gnustep/ files/ media-gfx/ skel.metadata.xml 65app-gnustep/ files/ media-gfx/ skel.metadata.xml
66app-i18n/ fresco-base/ media-libs/ snapshots/ 66app-i18n/ fresco-base/ media-libs/ snapshots/
67app-misc/ games-action/ media-plugins/ sys-apps/ 67app-misc/ games-action/ media-plugins/ sys-apps/
68app-office/ games-arcade/ media-radio/ sys-build/ 68app-office/ games-arcade/ media-radio/ sys-build/
117 117
118<p> 118<p>
119Remember that we told you that a Gentoo package is called an ebuild? Well, in 119Remember that we told you that a Gentoo package is called an ebuild? Well, in
120the example directory four of such ebuilds are stored. Their naming is 120the example directory four of such ebuilds are stored. Their naming is
121almost identical: they only differ in the version name. 121almost identical: they only differ in the version name.
122You are free to view the contents of such a package: they are plain scripts. We 122You are free to view the contents of such a package: they are plain scripts. We
123will not discuss it right now as it isn't important to know if you plan on just 123will not discuss it right now as it isn't important to know if you plan on just
124using Gentoo. 124using Gentoo.
125</p> 125</p>
126 126
127<p> 127<p>
128The other files are the <path>ChangeLog</path> (which contains a listing of all 128The other files are the <path>ChangeLog</path> (which contains a listing of all
129the changes done to the ebuilds), <path>Manifest</path> (which contains the 129the changes done to the ebuilds), <path>Manifest</path> (which contains the
130checksums and permissions of all the files in the directory) and 130checksums and permissions of all the files in the directory) and
131<path>metadata.xml</path> (which contains more information about the package, 131<path>metadata.xml</path> (which contains more information about the package,
132such as the responsible development group -- called <e>herd</e> and a more 132such as the responsible development group -- called <e>herd</e> -- and a more
133extensive description). 133extensive description).
134</p> 134</p>
135 135
136<p> 136<p>
137Inside the <path>files</path> directory you will find extra files, needed by 137Inside the <path>files</path> directory you will find extra files, needed by
138Portage: digests (checksums and permissions of the files needed by a single 138Portage: digests (checksums and permissions of the files needed by a single
139version of the package), patches, example configuration files, etc. 139version of the package), patches, example configuration files, etc.
140</p> 140</p>
141 141
142<pre caption="Viewing the extra files"> 142<pre caption="Viewing the extra files">
143# <i>cd files; ls --classify</i> 143# <i>cd files; ls --classify</i>
1441.0.3/ digest-openoffice-1.0.3-r1 digest-openoffice-1.1.0-r1 1441.0.3/ digest-openoffice-1.0.3-r1 digest-openoffice-1.1.0-r1
1451.1.0/ digest-openoffice-1.1.0 digest-openoffice-1.1.0-r2 1451.1.0/ digest-openoffice-1.1.0 digest-openoffice-1.1.0-r2
146# <i>cd 1.1.0; ls --classify</i> 146# <i>cd 1.1.0; ls --classify</i>
147fixed-gcc.patch ooffice-wrapper-1.3 147fixed-gcc.patch ooffice-wrapper-1.3
213 Latest version installed: 3.8 213 Latest version installed: 3.8
214 Size of downloaded files: 2,782 kB 214 Size of downloaded files: 2,782 kB
215 Homepage: http://www.mozilla.org/projects/security/pki/nss/ 215 Homepage: http://www.mozilla.org/projects/security/pki/nss/
216 Description: Mozilla's Netscape Security Services Library that implements PKI support 216 Description: Mozilla's Netscape Security Services Library that implements PKI support
217</pre> 217</pre>
218 218
219<p> 219<p>
220As you can see, the output of <c>emerge</c> informs you about the category and 220As you can see, the output of <c>emerge</c> informs you about the category and
221name of the package, the available version, the currently installed version, 221name of the package, the available version, the currently installed version,
222the size of the downloaded files, the homepage and the small description. 222the size of the downloaded files, the homepage and the small description.
223</p> 223</p>
224 224
225<p> 225<p>
226You see something new? Yes, <e>downloaded files</e>. When you tell Portage to 226You see something new? Yes, <e>downloaded files</e>. When you tell Portage to
227install a package, it of course needs to have the necessary sources (or 227install a package, it of course needs to have the necessary sources (or
228precompiled packages) available. It therefor checks the contents of 228precompiled packages) available. It therefore checks the contents of
229<path>/usr/portage/distfiles</path> (for sourcecode) or 229<path>/usr/portage/distfiles</path> (for sourcecode) or
230<path>/usr/portage/packages/All</path> (for precompiled packages) to see if the 230<path>/usr/portage/packages/All</path> (for precompiled packages) to see if the
231necessary files are already available. If not, it downloads the necessary files 231necessary files are already available. If not, it downloads the necessary files
232and places them in those directories. 232and places them in those directories.
233</p> 233</p>
234 234
235<note> 235<note>
236Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very 236Searching the Portage Tree, especially when using <c>--searchdesc</c>, is very
237time consuming. There are other, more performant tools available. We will 237time consuming. There are other, more performant tools available. We will
238describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and 238describe those in the chapter on <uri link="?part=2&amp;chap=7">Gentoolkit and
239Other Tools</uri>. 239Other Tools</uri>.
240</note> 240</note>
241 241
242</body> 242</body>
243</subsection> 243</subsection>
256# <i>emerge --pretend --changelog gnumeric</i> 256# <i>emerge --pretend --changelog gnumeric</i>
257</pre> 257</pre>
258 258
259</body> 259</body>
260</subsection> 260</subsection>
261</section> 261</section>
262<section> 262<section>
263<title>Updating Portage</title> 263<title>Updating Portage</title>
264<subsection> 264<subsection>
265<title>Introduction</title> 265<title>Introduction</title>
266<body> 266<body>
267 267
268<p> 268<p>
269Searching through Portage is nice, but if you don't update your Portage Tree 269Searching through Portage is nice, but if you don't update your Portage Tree
270regularly, you will be stuck with the packages and versions available on your 270regularly, you will be stuck with the packages and versions available on your
271system. This means that your system will get outdated pretty soon, and that 271system. This means that your system will get outdated pretty soon and that
272packages with possible security problems will remain on your system. 272you will be missing bugfixes and remedies for possible security problems.
273</p> 273</p>
274 274
275<p> 275<p>
276There are several ways to update your Portage Tree. The most popular method is 276There are several ways to update your Portage Tree. The most popular method is
277by using one of our <uri link="/main/en/mirrors.xml">rsync mirrors</uri>. 277by using one of our <uri link="/main/en/mirrors.xml">rsync mirrors</uri>.
278Another one is by using a Portage snapshot (in case a firewall or unavailability 278Another one is by using a Portage snapshot (in case a firewall or unavailability
279of a network prohibits the use of the rsync server). 279of a network prohibits the use of the rsync server).
280</p> 280</p>
281 281
282</body> 282</body>
283</subsection> 283</subsection>
284<subsection> 284<subsection>
285<title>Selecting a Mirror for rsync</title> 285<title>Selecting a Mirror for rsync</title>
286<body> 286<body>
287 287

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20