This is a long standing bug with portage and it's os.chown() handling which throw tracebacks/cause failures other other misc errors when not using root user for all ebuild phases. using the root user is unneeded often as many operations can be preformed fine as a user with the proper permissions. I will attach a small series of patches which correct this behavior and allow the following operations (clean unpack compile install package) to be preformed by a user with the right permissions without the need for fakeroot. The patches help speed up development time for developers like me as we often use the ebuild command directly to perform a small set of tasks on a given ebuild. Please apply for sys-apps/portage-2.0.51.20-r6
Created attachment 57478 [details, diff] patch 1
Created attachment 57479 [details, diff] patch 2
Created attachment 57480 [details, diff] patch 3
Patches 1 & 2 are the same.
Created attachment 57488 [details, diff] patch 2
Fixed on or before 2.0.51.22-r1
Looking through the batch of bugs, I'm not sure that some of these are actually fixed in stable. Others, the requirements have possibly changed after the initial fix was committed. If you think this bug has been closed incorrectly, please reopen or ask that it be reopened.