an example: <aye@CogES>~: cat /etc/portage/profile/package.provided sys-kernel/gentoo-dev-sources media-sound/alsa-driver media-sound/alsa-headers-1.0.6a sys-kernel/linux26-headers-2.6.8.1-r1 <aye@CogES>~: USE=alsa emerge -pe world |grep -E '(alsa|kernel)' [ebuild N ] sys-kernel/linux26-headers-2.6.8.1-r1 [ebuild N ] sys-kernel/usermode-sources-2.6.6-r6 [ebuild N ] media-video/nvidia-kernel-1.0.6111-r2 [ebuild N ] media-libs/alsa-lib-1.0.6 well - portage doesn't respect my last entry and wants to install kernel headers. additionall: sys-kernel/gentoo-dev-sources and media-sound/alsa-driver works without version. when i try it with some *-headers, an error occurs: <aye@CogES>~: grep 26-he /etc/portage/profile/package.provided sys-kernel/linux26-headers <aye@CogES>~: USE=alsa emerge -pe world |grep -E '(alsa|kernel)' Invalid package name: sys-kernel/linux26-headers
linux26-headers is either in your /var/lib/portage/world file or in your /etc/make.profile/packages files which implies that it was installed with portage. You should be using /etc/portage/package.mask to prevent upgrading. Furthermore, if portage is wanting to upgrade linux26-headers to 2.6.8.1-r1 then that isn't the version you should be putting into package.provided. If you did in fact in fact install linux26-headers manually, then what you want to do is: 1. add "-*sys-kernel/linux26-headers" to /etc/portage/profile/packages 2. add "virtual/os-headers sys-kernel/linux26-headers" to /etc/portage/virtuals 3. grep -v linux26-headers /var/lib/portage/world > /tmp/newworld 4. cat /tmp/newworld > /var/lib/portage/world 5. rm /tmp/newworld 6. echo "sys-kernel/linux26-headers-2.6.8.1" >> /etc/portage/profile/package.provided (or whatever version you *have* installed) If all you want to do is prevent portage from upgrading the linux26-headers that portage has already installed for you: 1. echo ">=sys-kernel/linux26-headers-2.6.8.1-r1" > /etc/portage/package.mask
indeed - i had linux26-headers in world file.. what about thesecond part? why sys-kernel/gentoo-dev-sources and media-sound/alsa-driver can be listed in package.provided without specific version, while *-headers not. can i safetly add packages without version there, or should i always add version and mask newer?