Posts tagged ‘emerge’

Speed up Emerge by compiling in RAM with tmpfs

gentoo.png

After testing this on a couple of emerges I am quite confident it works AS LONG AS YOU HAVE ENOUGH RAM – enough is 768M or more, although may be okay on 512M with a minimal desktop or X-less server. Tested on three machines with (768M, 1G, and 3G of RAM). The emerge of xorg-server went from 1.5 hours to about 20 minutes on an athlon-xp, for example.

Portage uses /var/tmp/portage (by default) as it’s working directory, everything is built in there before it gets merged to /. So, why not stick /var/tmp/portage in RAM? It’s a tmp directory after all, saves all that I/O bottleneck…

Interested? Okay, here’s what you have to do…

Continue reading ‘Speed up Emerge by compiling in RAM with tmpfs’ »

Why is package-y getting pulled in when I emerge package-x

gentoo.gif

Q: Why does portage want to install package <y> as a dependency of <x>?

A: Use emerge’s –tree option to find out.

Code:
emerge –tree –pretend –verbose <x>


This will give you a tree showing which packages are dependencies of others. These dependencies can sometimes be controlled by USE flags, so for instance, if you’re trying to install a headless server but packages are trying to pull in xorg-x11 as a dependency, make sure you’ve got -motif in your USE flags as well as -X -kde -qt -gnome -gtk etc. If you’re unsure about how to use USE flags, see the handbook section here.

Gentoo Trick: Send SMS alerts when emerge completes

gentoo.gif

My most recent large update (>500 packages) prompted this idea. Around the tenth time an ebuild failed mere moments after I left the room (not to return for hours), I decided to have the darn thing alert me when it wanted attention.

The following assumes you have installed:

  • The mailx client (mail-client/mailx), to send mail from shell scripts and the command line.
  • An MTA (mail transfer agent) for mailx to use, such as Postfix, Sendmail or ssmtp.

Continue reading ‘Gentoo Trick: Send SMS alerts when emerge completes’ »

Gentoo Tip: Emerge dependency of a package.

gentoo.png

Packages that are dependencies of other packages (i.e. have no use on their own) should be emerged as “oneshot”. This is because if the main package is removed so too will this package when “emerge –depclean” is run. Otherwise these dependent packages are added to the world file.

emerge --oneshot package

Gentoo tip: Specify USE Flags per package

gentoo.png

Add to /etc/portage/package.use
pkg-category/pkg useflag useflag2

To add a USE flag temporarily:

USE=”useflag” emerge package

Gentoo update (list of short commands)

gentoo.png

I’m often looking for the right command when i start with Gentoo, so I’ve post here a shortlist of commands that i found on some sites. The first entire will recompile all ports, so keep in mind that will take a long time.

Continue reading ‘Gentoo update (list of short commands)’ »

How to use emerge in Gentoo

gentoo.png

Chances are if you have the know how to use Gentoo and made it thus far to get it installed you probably don’t need this tutorial, but it’s good to have as much documentation as possible. Emerge makes installing easy, just as apt-get would be Ubuntu, but in emerge we can install source built applications rather than binary applications, thus is the Gentoo way. And along with that is many more options for these packages. This tutorial will just cover the basics.

Emerge searches through the Portage Tree for applications. The Portage tree is a collection of ebuilds files that contain all information Portage needs to maintain software (install, search, query, …). These ebuilds reside in /usr/portage by default.

Whenever you ask Portage to perform some action regarding software titles, it will use the ebuilds on your system as a base. It is therefore important that you regularly update the ebuilds on your system so Portage knows about new software, security updates, etc.

Continue reading ‘How to use emerge in Gentoo’ »