We have briefly encountered
Since
# man emerge # emerge --help
Before we continue describing
# cd /usr/portage; ls --classify(The --classify will append a special character to note the filetype) app-admin/ dev-ml/ gnome-libs/ net-print/ app-arch/ dev-perl/ gnome-office/ net-wireless/ app-benchmarks/ dev-php/ header.txt net-www/ app-cdr/ dev-python/ incoming/ net-zope/ app-crypt/ dev-ruby/ jython/ packages/ app-dicts/ dev-tcltk/ kde-apps/ profiles/ app-doc/ dev-tex/ kde-base/ releases/ app-editors/ dev-util/ kde-i18n/ scripts/ app-emacs/ distfiles/ kde-libs/ sec-policy/ app-emulation/ eclass/ licenses/ skel.ChangeLog app-games/ experimental/ media-fonts/ skel.ebuild app-gnustep/ files/ media-gfx/ skel.metadata.xml app-i18n/ fresco-base/ media-libs/ snapshots/ app-misc/ games-action/ media-plugins/ sys-apps/ app-office/ games-arcade/ media-radio/ sys-build/ app-pda/ games-board/ media-sound/ sys-cluster/ app-portage/ games-emulation/ media-tv/ sys-devel/ app-sci/ games-engines/ media-video/ sys-fs/ app-shells/ games-fps/ metadata/ sys-kernel/ app-text/ games-kids/ net-analyzer/ sys-kmods/ app-vim/ games-misc/ net-apache/ sys-libs/ app-xemacs/ games-mud/ net-dialup/ unix2tcp/ berlin-base/ games-puzzle/ net-dns/ x11-base/ dev-ada/ games-roguelike/ net-firewall/ x11-libs/ dev-cpp/ games-rpg/ net-fs/ x11-misc/ dev-db/ games-server/ net-ftp/ x11-plugins/ dev-dotnet/ games-simulation/ net-im/ x11-terms/ dev-embedded/ games-sports/ net-irc/ x11-themes/ dev-games/ games-strategy/ net-libs/ x11-wm/ dev-haskell/ games-util/ net-mail/ xfce-base/ dev-java/ glep/ net-misc/ xfce-extra/ dev-lang/ gnome-apps/ net-nds/ dev-libs/ gnome-base/ net-news/ dev-lisp/ gnome-extra/ net-p2p/
As you can see, the Portage tree has several subdirectories. Most of them are
the
# cd app-office; ls --classify abiword/ gnotime/ kmymoney2/ ooodi/ plan/ timestamp.x dia/ gnucash/ koffice/ oooqs/ qhacc/ dia2code/ gnumeric/ lxbank/ openoffice/ sc/ facturalux/ ical/ lyx/ openoffice-bin/ scribus/ gaby/ kbudget/ mdbtools/ openoffice-ximian/ siag/ gnofin/ khacc/ mrproject/ phprojekt/ texmacs/
Inside a category you will find the packages belonging to that category, with a
seperate directory for each package. Let us take a look at the
# cd openoffice; ls --classify ChangeLog files/ openoffice-1.0.3-r1.ebuild openoffice-1.1.0-r2.ebuild Manifest metadata.xml openoffice-1.1.0-r1.ebuild openoffice-1.1.0.ebuild
Remember that we told you that a Gentoo package is called an ebuild? Well, in the example directory four of such ebuilds are stored. Their naming is almost identical: they only differ in the version name. You are free to view the contents of such a package: they are plain scripts. We will not discuss it right now as it isn't important to know if you plan on just using Gentoo.
The other files are the
Inside the
# cd files; ls --classify 1.0.3/ digest-openoffice-1.0.3-r1 digest-openoffice-1.1.0-r1 1.1.0/ digest-openoffice-1.1.0 digest-openoffice-1.1.0-r2 # cd 1.1.0; ls --classify fixed-gcc.patch ooffice-wrapper-1.3 newstlportfix.patch openoffice-1.1.0-linux-2.6-fix.patch no-mozab.patch openoffice-1.1.0-sparc64-fix.patch nptl.patch
If you go back to the root of the Portage tree (
If you are new to Linux or Gentoo, you might not know what tool you need for
what job. To facilitate searching,
To search through the Portage tree by name, use
# emerge search mozilla Searching... [ Results for search key : mozilla ] [ Applications found : 5 ](Some output removed to improve readability) * net-www/mozilla Latest version available: 1.5-r1 Latest version installed: 1.4-r3 Size of downloaded files: 29,153 kB Homepage: http://www.mozilla.org Description: The Mozilla Web Browser * net-www/mozilla-firebird Latest version available: 0.7 Latest version installed: [ Not Installed ] Size of downloaded files: 37,850 kB Homepage: http://www.mozilla.org/projects/firebird/ Description: The Mozilla Firebird Web Browser(...)
If you want to include a search through the descriptions too, use the
# emerge --searchdesc mozilla Searching... [ Results for search key : mozilla ] [ Applications found : 10 ](Some output removed to improve readability) * dev-libs/nss-3.8 Latest version available: 3.8 Latest version installed: 3.8 Size of downloaded files: 2,782 kB Homepage: http://www.mozilla.org/projects/security/pki/nss/ Description: Mozilla's Netscape Security Services Library that implements PKI support
As you can see, the output of
You see something new? Yes,
While browsing through the Portage Tree, you saw that there was a ChangeLog for
each package. You can view this ChangeLog with
# emerge --pretend --changelog gnumeric
Searching through Portage is nice, but if you don't update your Portage Tree regularly, you will be stuck with the packages and versions available on your system. This means that your system will get outdated pretty soon, and that packages with possible security problems will remain on your system.
There are several ways to update your Portage Tree. The most popular method is
by using one of our
It is adviseable to first select a fast
# emerge --usepkg mirrorselect
Now run
# mirrorselect -a -s3
To update Portage using rsync, simply run
# emerge sync
If this fails (due to network problems, or a firewall), you can try using
# emerge-webrsync
Gentoo provides ebuilds, the Gentoo packages if you like. But when you want to
install such an ebuild, you can choose between
As you probably have guessed, building packages takes a lot of time (especially
if you have little resources or want to build big packages, such as
Using prebuild packages improves the installation time (as no more compilation
is needed), but you will lose the advantages of the
As previously stated, prebuild packages are stored in the
Okay, enough talking, let's cut to the chase. To install a package, you will use
the
# emerge gnumeric
This will download the sourcecode for you and unpacks, compiles and installs the
package on your system. It will also do the same for all the dependencies. If
you want to see what dependencies will be installed with it, use the
# emerge --pretend gnumeric
If you want to download the sourcecode of the package and its dependencies,
but don't want to build the package, use the
# emerge --fetchonly gnumeric
If you want to see where
# emerge --fetchonly --pretend gnumeric
You can also opt to install a specific version of a package. For instance, if you want to install a gnumeric version older than 1.2 -- for any reason whatsoever :) you would type:
# emerge "<gnumeric-1.2"
Other possibilities are ofcourse ">" (later version) and "=" (the exact version).
When you want to install a prebuild package, you should use the
# emerge --usepkg gnumeric
If you want to use the binary package, even if the versions don't match, use
# emerge --usepkgonly gnumeric
If you don't have the prebuild package on your system yet, you can have
To download the binary package in case this package doesn't exist on
your system already, use
# emerge --getbinpkg gnumeric
This will download the package and the package-related information for you and
install it on your system, together with the dependencies. If you want to see
what dependencies will be installed with it, use the
# emerge --ginbinpkg --pretend gnumeric
You can also opt to download the prebuild package (and the package-related
information)
# emerge --getbinpkgonly gnumeric
You can also opt to install a specific version of a package. For instance, if you want to install a gnumeric version older than 1.2 -- for any reason whatsoever :) you would type:
# emerge --usepkg "<gnumeric-1.2"
Other possibilities are ofcourse ">" (later version) and "=" (the exact version).
Portage knows two special tags to denote a set of software packages:
The
If you want to update the system packages, use the
# emerge --update system
An identical approach can be used for the world packages:
# emerge --update world
Again, if you want to see what
# emerge --pretend --update world(Some output removed to improve readability) [ebuild U ] net-misc/wget-1.9-r1 [1.9] [ebuild UD] media-video/dvdauthor-0.5.0 [0.5.3] [ebuild U ] net-analyzer/ethereal-0.9.16 [0.9.14]
Right next to the word "ebuild" you will notice a letter (or combination of letters) which gives you more information about the package:
In certain cases, an update may mean a downgrade (i.e. install an older version
instead of a newer version). If you don't want this to happen, use the
# emerge --update --upgradeonly world
Ofcourse, we are talking here about
If you want to remove software from your system, you can use the
# emerge unmerge gnumeric
If you want to test a removal (but not perform it), you can use
# emerge --pretend unmerge gnumeric
Gentoo places its packages in two possible stadia called
The
Your system will use
If you want to update your system now, you will notice that
When you want to install a package, you might come across the following message:
Calculating dependencies !!!all ebuilds that could satisfy <your package>have been masked.
A package can be masked due to two reasons:
If the package is masked because of the first reason, and you
# ACCEPT_KEYWORDS="~x86" emerge gnumeric
A package is hardmasked if it is listed in
Do
Another trick to circumvent the "masked package" problem is to install the
package using the full path. This will ignore both the
# emerge /usr/portage/app-office/gnumeric/gnumeric-1.2.0.ebuild
You have a situation when you receive the following error on your screen:
[blocks B ] gnome-base/bonobo-activation (from pkg gnome-base/libbonobo-2.4.0)
In the above example, the package
# emerge unmerge bonobo-activation