Dec
03
2008
0

Inject packages into Gentoo

Some packages in Gentoo require kernel sources to be installed. In my case it was the DRBD kernel module.

The system I wanted to install it on is actually a Linode. They provide the sources for the VPS kernels but I needed a way to pursuade Portage that it didn’t need to install gentoo-sources before drbd-kernel. I didn’t want to use –nodeps.

I found the solution in chapter 5 of part 3 of the Gentoo Handbook:

  1. Create a file called package.provided in /etc/portage/profile. You may need to create that directory:
  2. Add a line corresponding to the package you want to inject:
    sys-kernel/gentoo-sources-2.6.25-r1

Note: The package name you provide must exist in portage. You can’t inject virtual packages and you have to provide a full package name with version number. The following don’t work:

virtual/kernel-sources
sys-kernel/gentoo-sources
=sys-kernel/gentoo-sources-*
Written by theboywho | Tags: , , ,

WordPress | Aeros