I do not know how to describe better, than using an example: 1.) emerge "sys-kernel/vanilla-sources-2.6.19.5" 2.) emerge l7-filter 3.) USE="symlink" emerge "sys-kernel/vanilla-sources-2.6.19.7" 4.) emerge -pvuDN l7-filter updating l7-filter after switching kernel sources does not work. The l7-filter package sees itself installed and so it is cleaned after installing. The ebuild should check the kernel-sources, if the patch has been applied.
emerge module-rebuild if you want this 'automated'; emerge -u won't upgrade something where there's nothing to upgrade. http://www.gentoo.org/doc/en/kernel-upgrade.xml
I did not compile l7-filter as a module, it is compiled into the kernel. I am not sure, if you got it right, Jakub: At the moment, the only way to patch new kernel sources is to use emerge -aC l7-filter while the symlink points to the current kernel. Then changing the symlink and re-emerging l7-filter works. But then the previous kernel sources are unusable, since l7-filter has been removed. If you try to re-emerge l7-filter after changing the symlink to the kernel sources, the install of l7-filter fails.
(In reply to comment #2) > If you try to re-emerge l7-filter after changing the symlink to the kernel > sources, the install of l7-filter fails. How does it fail? You need to post some errors if you claim that something fails. If you upgrade your kernel, you need to re-emerge *all* kernel modules, period. Read the howto.
After changing the symlink to the new kernel sources you will have to re-emerge l7-filter, I agree. I do that while using: emerge l7-filter Since portage thinks l7-filter is still installed, it runs autoclean after emerging l7-filter again, this results in a corrupted patch. There are 2 workarounds: - unemerge l7-filter before switching to a new kernel-source: emerge -aC l7-filter, but then the current source is broken. - delete: /var/db/pkg/net-misc/l7-filter-* and then emerge thinks, l7-filter hasn't been installed and an emerge l7-filter works again.
(In reply to comment #4) > Since portage thinks l7-filter is still installed, it runs autoclean after > emerging l7-filter again, this results in a corrupted patch. Uhm no, it doesn't result in any corrupted patch; it unpatches the kernel it's been installed *against* previously, not the *current* one. So what exactly are you requesting here?
well, that's how it should work, at least it didn't work for me. If I switch to new kernel-sources, I do not want to unapply the patch of the older sources. But it never worked for me, since l7-filter ebuild always used /usr/src/linux. So it uninstalled itself after installing. I do not have a testing system right now, but I will give further infos on next kernel-update. I found a solution which works perfectly for me: rm -rf /var/db/pkg/net-misc/l7-filter-*