The profiles/repo_name file (obligatory) specifies the repository name. The name assigned there is used by the package manager to refer to the contents of the repository. In case a repo-name key is given in metadata/layout.conf that one takes precedence.
The repo_name file is a plain, ASCII text file containing the repository name on its only line.
For configuration files or sections in /etc/portage/repos.conf it is recommended that
[repository_name] is the same as the name specified here.
layman repository list
It is required that repository names in repo_name files are the same as repository names on the layman repository list. In the future, an automated check will be added to enforce that as requested in bug #382603.