# need package.provided help

## Ormaaj

I want to never see portage ask to install a kernel again. Package.provided isn't working. This should be a valid atom according to ebuild(5)

```
=sys-kernel/gentoo-sources-*
```

----------

## Etal

 *Ormaaj wrote:*   

> I want to never see portage ask to install a kernel again. Package.provided isn't working. This should be a valid atom according to ebuild(5)
> 
> ```
> =sys-kernel/gentoo-sources-*
> ```
> ...

 

In package.provided, it should look like this:

```
sys-kernel/gentoo-sources-2.6.38
```

You need to specify the version so that portage can resolve dependencies where a specific version of the kernel is needed.

However, I would not recommend doing that because a lot of ebuilds that need specific kernel features look into /usr/src/linux to see if they're available.

----------

## Ormaaj

I tried adding "sys-kernel/gentoo-sources-2.6.39". This used to work but for some reason it's still getting pulled in this time.

```
[ebuild  N     ] sys-kernel/gentoo-sources-2.6.39  USE="-build -deblob -symlink" 19,063 kB [0]
```

I manage the symlink manually. Eventually I'll modify the eselect module to handle directories under /usr/src.

EDIT: It looks like this file has moved in portage 2.2. Testing now...

 *Quote:*   

> /etc/make.profile/ or /etc/portage/make.profile/
> 
> ...
> 
> package.provided

 

----------

## Etal

Try emerge with the -t option to see what's pulling it in.

Another alternative you could try is add "virtual/linux-sources-2.6" into package.provided and "sys-kernel/gentoo-sources" into package.mask.

----------

## Ormaaj

 *portage(5) wrote:*   

> Virtual  packages	(virtual/*)  should not be specified in package.provided.  Depending on the type of virtual, it may be necessary to add an entry to the virtuals file and/or add a package that satisfies a virtual to package.provided.

  So I didn't try this.

Looks like the relevant part of emerge -uDNtpv @world @system

```
[nomerge       ] app-emulation/virtualbox-4.0.8  USE="additions alsa extensions opengl python qt4 sdk -doc -headless -java -pulseaudio -vboxwebsrv -vnc"  [0]

[nomerge       ]  app-emulation/virtualbox-modules-4.0.8  [0]

[nomerge       ]   virtual/linux-sources-2.6  USE="-hardened"  [0]

[ebuild  N     ]    sys-kernel/gentoo-sources-2.6.39  USE="-build -deblob -symlink" 19,063 kB [0]
```

However it looks like the package.provided file is working:

```
portage # emerge -tpv gentoo-sources

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 kB

WARNING: A requested package will not be merged because it is listed in

package.provided:

  gentoo-sources pulled in by 'args'
```

Looking at the portage git log I don't notice anything in the last few revisions that would have changed things either.

The RDEPEND for virtual/linux-sources:

```
RDEPEND="|| (

      hardened? ( =sys-kernel/hardened-sources-2.6* )

      =sys-kernel/gentoo-sources-2.6*

      =sys-kernel/vanilla-sources-2.6*

      =sys-kernel/cell-sources-2.6*

      =sys-kernel/ck-sources-2.6*

      =sys-kernel/git-sources-2.6*

      =sys-kernel/hardened-sources-2.6*

      =sys-kernel/mips-sources-2.6*

      =sys-kernel/mm-sources-2.6*

      =sys-kernel/openvz-sources-2.6*

      =sys-kernel/pf-sources-2.6*

      =sys-kernel/tuxonice-sources-2.6*

      =sys-kernel/usermode-sources-2.6*

      sys-kernel/vserver-sources

      =sys-kernel/xbox-sources-2.6*

      =sys-kernel/xen-sources-2.6*

      =sys-kernel/zen-sources-2.6*

   )"
```

----------

## kimmie

Putting an entry in /etc/portage/package.mask should do what you want, eg. >sys-kernel/gentoo-sources-<your current-kernel-version>

----------

