REPOSITORY variable should be set in ebuild environment, similarly to CATEGORY and PN variables. REPOSITORY variable would have value from ${repository_path}/profiles/repo_name.
Why?
Such a knowledge might be useful for some ebuilds in overlays. It does not matter if it would be useful in gentoo-x86.
The same arguments as in bug 414815 apply here. Ebuilds shouldn't change their behaviour if moved to a different repository. Therefore they shouldn't need to know in what repository they are located.
Portage commit: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0d9ea2752aa7819e5b26b47920c09218d9f5b7c2
Closing per comment #3.