Need a mechanism for eselected kernel package to become part of system. Detecting which package is being eselected by the directory is pretty simple(if it is indeed a package). But then needs a file outside of portage dir to write to which can be recognized for system packages. This way it is protected from depclean or unmerging while it is selected as the active kernel. More options: make /var/lib/portage/world a directory, or a virtual kernel system package. I dont know what you guys think is best, i just want a way to protect the active kernel package(if available, i know some people dont use kernel packages)
If you emerge sources (without oneshot), it stays protected (it gets recorded in your world file). Is that you mean?
unclear what you want here. kernel sources are not required for operation of system.