Gentoo Portage secrets

March 7, 2007

While searching for something special on internet , my eyes got captured on a post in that is “Gentoo Portage secrets”.

Gentoo Linux is perhaps the most-used source-based Linux distribution. One secret to its success is the powerful and handy Portage package management system. While Gentoo comes with extensive documentation covering most aspects of using Portage, the techniques described in Gentoo’s handbook and other documentation are not always the most effective ones. Here are some insider tips that can greatly increase your productivity.

Search faster 

Before you install a package, you usually look for it via Portage’s search capabilities. Portage’s emerge utility has –search and –searchdesc options, but using them is not enjoyable, because they take a long time to run. That’s why we’ve seen the emergence of third-party search front ends for Portage, such as esearch and eix. Their common idea is to use their own search indexes to speed up searches. When using either utility, you have to rebuild the index after updating the Portage tree, and after installing and uninstalling software. Of the two, eix works faster and has more capabilities.

Optimizing traffic usage 

Updating your software can take a lot of network bandwidth. There are tools that help you decrease Portage’s appetite. The most effective and well-known such tool is Deltup, which allows you to download deltas, or the differences between new and old versions of package source. That approach can save you up to 90% of the download size. The procedure for installing deltup is described in the Gentoo wiki.The Gentoo wiki provides more tips for users with poor Internet connections.

Faster package compilation 

Every time you install or update some software under Gentoo, you need to wait until its source is compiled. Portage supports a set of tools that try to decrease the compiling time of your packages.One of the ways to speed up compilation on a slow machine is to distribute the compiling task to another host. This is what Distcc aims to do. You can even use Windows boxes to assist in the task.
Managing logs and configuration files

Another new feature in Portage 2.1 is the new logging framework. Many packages show notices while you emerge them, but you may not see them if you do not watch the emerge process. Now you just need to turn on elog, by adding these lines to /etc/make.conf:

# This sets what to log
PORTAGE_ELOG_CLASSES=”warn error log”
# And this is how to do it
and creating the /var/log/portage/elog directory. Now, each package’s emerge log will be saved in a separate file in the specified directory. You can find more info on configuring elog by inspecting the /etc/make.conf.example file. There are already GTK and QT graphical front ends for viewing these logs.


4 Responses to “Gentoo Portage secrets”

  1. Saw your Digg post on this you sent over.

    Unfortunately, I’m a Fedora Core guy, permanently attached to RPM. Personally, I think RPM rocks and is one of the most powerful parts of the OS. No experience whatever with Portage. What are the benefits over RPM/Yum?

  2. discoverx Says:

    you will get a detailed descripion on your question on the following link.

  3. Jason Says:

    I’ve used esearch for a long time on my 2 Gentoo machines, but I’m currently using Suse 10.1 on my laptop. In my mind, I far prefer the power of Gentoo, but I also really like the config tools that distro’s like Suse and Kubuntu provide. I’d really love to have something between the two. A Gentoo that behaves a bit more like Ubuntu (but retains the source-based power and performance)

  4. Ben Says:

    Hey Knoppix fan here. One of the most advanced Linux OS in the world based on Debian..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: