# How to prevent kernel updates during emerge world

## mitchy

I've got an issue where whenever I get new kernel sources during an emerge world, my webcam driver module (linuxuvc) seems to be broken.  I don't even have to compile and use the new kernel - just getting the new sources seems to break things.  To fix it I have to switch to the latest sources, compile, reboot, and then rebuild my linuxuvc module.  Is there any way that I can prevent from getting new kernel sources when I do an emerge world?

----------

## aceFruchtsaft

You can always use /etc/portage/package.mask to mask everything greater than you current kernel version:

```

>sys-kernel/gentoo-sources-2.6.x-ry

```

Also, I guess newly emerged kernels affect your system because you have the "symlink" USE flag set, which then points to the "wrong" kernel source if you do not compile, install and boot the new kernel right away.

----------

## alex.blackbit

it is unlikely that something already installed breaks due to new kernel sources.

maybe you have the "symlink" useflag set so that /usr/src/linux automatically points to the new version

AND

build your webcam module AFTERWARDS.

this way the module is built against sources that are not those of YOUR kernel.

one resolution is to unset "symlink" for the kernel sources you use.

if you do not want to get new sources at all, mask all versions higher than yours in /etc/portage/package.mask.

----------

## Kasumi_Ninja

Emerge gentoo-source with the --oneshot (-1) option. That way it isn't added to 'world' list.

Edit:

Which USEflags do you use with the gentoo-sources?

----------

## muhsinzubeir

ive also encountered some issues on the recent kernel releases en ive used the masking method, en i finally get to rest with peace   :Smile: 

 a little discussion bout it on this thread

----------

## mitchy

Here's my use flags from my make.conf:

```
USE="kde usb apm -gnome a52 unicode css 3dnow 3dnowext sse mmx mmxext -kerberos logrotate mysql opengl apache2 nsplugin -firefox xulrunner ipod x264 aac"
```

Just to check how gentoo-sources is getting emerged, I did this:

```

sonata mitchy # emerge -pv gentoo-sources

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

Calculating dependencies... done!

[ebuild   R   ] sys-kernel/gentoo-sources-2.6.25-r7  USE="-build -symlink" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

```

So it looks like symlink is not enabled.  I think masking the sources would work for me, but I'm still curious as to how this would break when I didn't switch over to the latest sources yet.

----------

## alex.blackbit

where does the /usr/src/linux symlink point to after emerging a sources package?

does this only happen after you re-emerge your webcam module?

----------

## mitchy

/usr/src/linux still points to the old one I believe.  I just moved up to the latest kernel to fix the problem last night, so I can't check for sure though.  And I do think the problem only happens after an update to my drivers.  Next time new kernel sources get released I plan on trying it out to see for sure.

----------

