Gentoo:Portage
From Linux 101, The beginner's guide to all things Linux.
Portage is Gentoo's package management system. Basically Windows has a setup program for each application you install on your computer. Linux works differently, and depending on your distribution choice, you will use different methods to install programs, or packages.
Portage is an impressive collection of applications. It exists as many directories and files on your system.
Contents |
[edit] Portage Tree
The portage tree is located in /usr/portage. The programs are sorted into directories of related programs. Here's a nice list, which depending on when you last synced your tree, may be slightly different than yours:
-
cd /usr/portage; ls
app-accessibility dev-php4 media-fonts sci-libs app-admin dev-php5 media-gfx sci-mathematics app-antivirus dev-python media-libs sci-misc app-arch dev-ruby media-plugins scripts app-backup dev-scheme media-radio sec-policy app-benchmarks dev-tcltk media-sound skel.ChangeLog app-cdr dev-tex media-tv skel.ebuild app-crypt dev-util media-video skel.metadata.xml app-dicts distfiles metadata sys-apps app-doc eclass net-analyzer sys-auth app-editors games-action net-dialup sys-block app-emacs games-arcade net-dns sys-boot app-emulation games-board net-firewall sys-cluster app-forensics games-emulation net-fs sys-devel app-i18n games-engines net-ftp sys-fs app-laptop games-fps net-im sys-kernel app-misc games-kids net-irc sys-libs app-mobilephone games-misc net-libs sys-power app-office games-mud net-mail sys-process app-pda games-puzzle net-misc www-apache app-portage games-roguelike net-nds www-apps app-shells games-rpg net-news www-client app-text games-server net-nntp www-misc app-vim games-simulation net-p2p www-servers app-xemacs games-sports net-print x11-apps dev-ada games-strategy net-proxy x11-base dev-cpp games-util net-wireless x11-drivers dev-db gnome-base net-www x11-libs dev-dotnet gnome-extra net-zope x11-misc dev-embedded gnustep-apps perl-core x11-plugins dev-games gnustep-base profiles x11-proto dev-haskell gnustep-libs rox-base x11-terms dev-java header.txt rox-extra x11-themes dev-lang kde-base sci-astronomy x11-wm dev-libs kde-misc sci-biology xfce-base dev-lisp licenses sci-calculators xfce-extra dev-ml mail-client sci-chemistry dev-perl mail-filter sci-electronics dev-php mail-mta sci-geosciences
As you can see, there are many categories of applications ready to be installed on a Gentoo system. In each of these directories are directories of programs that fit the category. Let's look in net-im:
-
cd net-im; ls
aim gaim imcom metadata.xml sendxmpp aim-transport gaim-blogger jabber-base micq silc-client amsn gaim-bnet jabberd msn-transport silc-plugin ayttm gaim-meanwhile jabberoo msnlib silc-server bitlbee gaim-snpp jit mu-conference silc-toolkit ccmsn gajim jive-messenger naim silky centericq gg-transport jud naim-modules sim coccinella gnome-jabber kadu ntame simpserver-bin cpop gnomeicu kf ohphone skype curphoo gnomemeeting kmess openc6 tkabber ejabberd gnophone kpopper openmcu tleenx2 ekg gnugadu kpopup pebrot tmsnc ekg2 gossip licq pork universalkopete everybuddy gtalk linpopup psi yahoo-transport express gyach magnesium pymsn-t ymessenger gabber ickle mercury-bin reaim ysm
You can see the plethora of instant messaging programs available in Linux! And finally, let's look in one of these directories, gaim:
-
cd gaim; ls
ChangeLog files/ gaim-0.82.1.ebuild gaim-1.0.1.ebuild Manifest gaim-0.81-r5.ebuild gaim-1.0.0.ebuild metadata.xml
[edit] Ebuild files
| |
| |
| which four versions of gaim that the ebuild files install?
|
The important files here are the .ebuild files. They are the hallmark of Gentoo. One of these files contains instructions on how to install a particular version of a program. This is why there are 4 ebuilds in this directory, each a different version of gaim. Install instructions include configuring the program for compilation based on the settings in your make.conf file, actually compiling it, then installing all of the files into the proper directories, and finally any special commands after moving the files, if needed.
[edit] How portage is used
First, you sync portage with a portage rsync server. This downloads a copy of portage to your system, if never downloaded before. If you've synced portage before, now it will update it, so it is the same as what's on the rsync server -- this will include new .ebuild files, and remove older .ebuild files. This way you have a listing of all available software for Gentoo that is up to date.
Something important to note is that each time you update the portage tree, you're downloading an entire copy of the tree, though it will only copy over new files and delete out the old ones. This is one of the reasons why Gentoo is so network-centric, because while updates are fast you must download all of the portage tree to do it. This also puts a lot of stress onto rsync servers, so Gentoo "etiquette" says you should sync no more than once a day.
The command that interacts with portage is emerge, and how to use it is explained there.
[edit] Final note
Portage is a single entity that lists available software for Gentoo Linux. It does not have every single program ever made for Linux, but rather the larger, at least fairly popular ones. If there is a program that you wish to see an ebuild for, check the Gentoo bugzilla to see if anyone has made one or to request it. What makes it so powerful is that as a single entity, you do not need to check for updates to particular programs.
|
The Portage Articles Series |
|---|
| portage | emerge | make.conf | use flags | cflags | Overlays |
| Navigation: Gentoo Index |

