Why not fix Portage?
The Portage codebase is too broken to be fixed. It is a huge mess of spaghetti procedural code with no underlying design. It relies upon weird quirks in its own behaviour all over the place, so any change is liable to cause huge breakage in seemingly unrelated areas. It is almost entirely undocumented, and the internal names are perverse and often do not reflect what the code now does.