Okay good to hear I pointed you in the right direction. Now I will give you another lead to great Sabayon/ Gentoo help that is a lot clearer and much less messy then mucking around in my brain!

Gentoo:emerge
From Linux 101, The beginner's guide to all things Linux.
Jump to: navigation, search
emerge is a very powerful command in Gentoo Linux, so it is important that we know how to use it.
Generally to install a program (and any dependencies it requires) onto your computer, you can type:
# emerge <program name>
and it will do its job. However, there is a lot more beyond this basic useage, so let's look at some special cases and some good uses for the program.
Contents
[hide]
* 1 Special emerge uses
o 1.1 Syncing
o 1.2 Gathering information
* 2 emerge command-line arguments
o 2.1 What is the emerge output telling me?
* 3 emerge and .ebuild files
* 4 The emerge installation process
* 5 An important note
[edit] Special emerge uses
[edit] Syncing
We have already discussed portage and that you sync the portage tree. You accomplish this with the command:
# emerge --sync
And emerge will sync your portage tree for you.
[edit] Gathering information
There is another useful special emerge command that does not install anything. This is useful for debugging information, or determining the settings that emerge uses when it is installing programs. This command is:
emerge --info
Note: The emerge command has had all action options (info, sync, metadata, etc.) not prefixed with a double-hyphen deprecated in favor of the above formatting.
[edit] emerge command-line arguments
emerge has a lot of useful command-line options, so let's explore a few.
after an emerge sync, you should do the following:
# emerge -Dup world
These are the packages that I would merge, in order:
Calculating world dependencies ...done!
[ebuild NS ] sys-kernel/gentoo-dev-sources-2.6.9-r6
[ebuild U ] gnome-base/gnome-mime-data-2.4.2 [2.4.1]
[ebuild U ] gnome-base/gconf-2.8.1 [2.8.0.1]
[ebuild U ] x11-themes/gnome-themes-2.8.1 [2.8.0]
[ebuild U ] media-libs/nas-1.7-r1 [1.7]
[ebuild U ] dev-libs/nspr-4.4.1-r2 [4.4.1-r1]
[ebuild U ] dev-libs/nss-3.9.2-r2 [3.9.2-r1]
[ebuild U ] mail-client/mutt-1.5.6-r5 [1.5.6-r4]
We ran emerge with 3 command-line options: D, u, and p. It would not have mattered what order we did them in (examples: Dup, uDp, puD, etc)
The D means check deep into the dependency tree. This means do not just check for the first level dependency applications/libraries, but check all the way down. If any application or library has been updated, then it is applicable to what we're about to do. This option doesn't tell emerge to perform an action, it qualifies the action to perform.
The u means update. This is how you tell emerge not to install all programs again, but to just update the ones that need updating. This option is telling emerge to perform an action (The D from above is qualifying this u).
The p means pretend. This is why emerge outputed a list of packages that it "would merge." This is just telling you what would be updated on your system, but it will not actually do the updating. If you ran this command without the p, then it would actually go through the install process.
# emerge -Dupv world
These are the packages that I would merge, in order:
Calculating world dependencies ...done!
[ebuild NS ] sys-kernel/gentoo-dev-sources-2.6.9-r6 -build -doc (-ultra1) 35000 kB
[ebuild U ] gnome-base/gnome-mime-data-2.4.2 [2.4.1] -debug 0 kB
[ebuild U ] gnome-base/gconf-2.8.1 [2.8.0.1] -debug -doc 0 kB
[ebuild U ] x11-themes/gnome-themes-2.8.1 [2.8.0] -accessibility -debug 0 kB
[ebuild U ] media-libs/nas-1.7-r1 [1.7] -static 0 kB
[ebuild U ] dev-libs/nspr-4.4.1-r2 [4.4.1-r1] 0 kB
[ebuild U ] dev-libs/nss-3.9.2-r2 [3.9.2-r1] 0 kB
[ebuild U ] mail-client/mutt-1.5.6-r5 [1.5.6-r4] -cjk +crypt -debug -imap -mbox +nls -nntp +slang +ssl -vanilla 0 kB
Here we have added the v option for verbose output. This is very useful, because it shows what USE flags each program uses, and how you currently have them set. For example, to compile mutt with support for IMAP, edit make.conf to add imap into the USE flags.
[edit] What is the emerge output telling me?
Let's discuss what the emerge output means.
[ebuild NS ] sys-kernel/gentoo-dev-sources-2.6.9-r6 -build -doc (-ultra1) 0 kB
The information in the brackets tell us two important things: N means it is a new install, and S is telling us it is in a different Slot. The information after that is telling us the category, sys-kernel specific package name, gentoo-dev-sources, and the version of what is new, 2.6.9-r6. Next are the USE flags, all of which I do not personally have set on my computer, -build, -doc, (-ultra1). The 35000 kB is telling us how much we have to download from the internet to install this. The S also means that prior versions of the package that were installed will not be uninstalled.
[ebuild U ] dev-libs/nspr-4.4.1-r2 [4.4.1-r1] 0 kB
We can pull the same information off this line just like the other. The differences here are that this is an U updated package. This means I have already installed dev-libs/nspr, but now a new version is available. In fact, the information in the second brackets tells us that I already have version 4.4.1-r1 installed, but version 4.4.1-r2 is available. Notice that there are no USE flags that affect this ebuild. Also, the 0 kB means I do not need to download anything in order to update this package.
[ebuild UD] net-misc/openssh-4.1_p1-r1 [4.2_p1]
While not in the above output, here we can see an instance of a package needing to be downgraded. This can occur for any number of reasons including the package being added to your package.mask file for security or stability reasons, or because there was the usage of ACCEPT_KEYWORDS on the command line to install an unstable version and it was not added to package.keywords
[edit] emerge and .ebuild files
In the past you could have downloaded an .ebuild file from somewhere (online, Gentoo forums, someone on IRC) and ran
# emerge whatever-it-was-called.ebuild
and it would have read the .ebuild file out of the current directory (or if you /used/an/absolute/directory/path.ebuild, it would work too) and go ahead and install it.
However, since those days this ability has been marked as deprecated and it will soon find its way out of the emerge code. This is just here for historical information.
[edit] The emerge installation process
The emerge installation process is like any other source distribution install, except it automates a lot of the difficult procedures that you would be doing otherwise.
1. Check for dependencies
2. Install dependencies as required
3. Download the source package
4. Decompress the source package
5. Configure the package
6. Compile the package
7. Test the package (as required or requested)
8. Install the package
9. Clean up the install directory (usually just remove it)
If you were to install programs by hand, usually you would have to start with the downloading of the source package. Then you would read the README and/or the INSTALL file. After that you could then determine any dependencies and the actual commands you would use to install the particular package.
Usually steps one and two are the ones that people hate so much. Because when you go to install a dependency, what if it also has dependencies? The dependency tree can quickly grow. This is why Gentoo's dependency solving is wonderful.
Configuring usually just revolves around the ./configure command. On some specially built packages this can get much more tedious.
After you configure, you would usually run make. Sometimes it is make linux, sometimes other things. It's nice that Gentoo knows and you don't need to.
After that its usually a make install. Perhaps you would need to run some other commands. Again, not your problem, emerge solves them for you.
Finally, you would usually cd ..; rm -rf sourcedirectory. But you don't need to.
[edit] An important note
emerge is not a root-user only program!! It is important that you notice this. You will only need root's permissions to install, uninstall, and sync. Commands to query what's installed, settings, and the like can all be run by normal users. However, to avoid permission errors regarding portage's cache, these users should be members of the portage group (emerge will produce a warning to this effect if run by a user not in the portage group).
The Portage Articles Series
portage | emerge | make.conf | use flags | cflags | Overlays
Navigation: Gentoo Index
Retrieved from "http://learn.clemsonlinux.org/wiki/Gentoo:emerge"
Views
* Article
* Discussion
* Edit this page
* History
Personal tools
* Log in / create account
Navigation
* Main Page
* Community portal
* Current events
* Recent changes
* Random page
* Help
Distributions
* Ubuntu Linux
* Gentoo Linux
* Slackware Linux
* Debian GNU/Linux
* Mandrake Linux
Search
Toolbox
* What links here
* Related changes
* Upload file
* Special pages
* Printable version
* Permanent link
Powered by MediaWiki
GNU Free Documentation License 1.2
* This page was last modified 04:56, 18 January 2007.
* This page has been accessed 29,632 times.
* Content is available under GNU Free Documentation License 1.2.
* Privacy policy
* About Lnx101
* Disclaimers
Joost, Wolfden, and many others here have taught me to lean on the Gentoo and Sabayon wikis they are great learning tools and easy to search and the info is solid.
ed