Since portage version 22.214.171.124 (and 2.2.0_alpha177) there are two new options for the repository configuration to make repoman aware which EAPIs are deprecated and which are completely banned (bug #470670).
The two configuration keys are eapis-deprecated and eapis-banned in layout.conf. The value for both keys is a space seperated list of selected EAPI numbers. This can be used in any portage ebuild repository, it works in a overlay and in the main portage tree as well.
Lets assume you have an overlay and want to get rid of all old EAPIs with the goal to make the life for contributors easier to know only the latest and not the whole EAPI history. This means you have to mark all as deprecated except the latest.
# indicate that ebuilds with the specified EAPIs are deprecated eapis-deprecated = 0 1 2 3 4
And then let repoman in the overlay root directory run to check which ebuilds using old EAPI.
$overlay repoman full -d
In case repoman find relevant ebuilds, he will be print the ebuild names with the EAPI version as warning. Now comes the fun part, you can start to migrate your ebuilds to latest EAPI. And whenever you have killed a deprecated EAPI, move it from deprecated to banned in the configuration. This means repoman won’t allow you to commit those to the repo anymore. In this example we get rid of EAPI 0.
# indicate that ebuilds with the specified EAPIs are banned eapis-banned = 0 # indicate that ebuilds with the specified EAPIs are deprecated eapis-deprecated = 1 2 3 4
The current configuration for the main portage tree is that no EAPI is banned and EAPI 1 + 2 is deprecated. Since the last weekend in kde overlay all ebuilds are migrated to latest EAPI (5) and older are banned (0-4). Migration was quite easy, because we had just some ebuilds left with EAPI 4. Thanks to the portage team for this nice feature.