emerge aborts with an error, saying "xargs: chmod: Argument list too long". I encountered the error after `emerge /dev-lang/fpc-2.0.4`. I am not quite sure, whether this is related to the ebuild or not, because I could fix this by patching portage_data.py (see "Additional Information"). So maybe this is related to a bug in xargs? Reproducible: Always Steps to Reproduce: emerge /dev-lang/fpc-2.0.4 (indirectly requires findutils-4.3.0) An ugly workaround is to patch Portage in /usr/lib/portage/pym/portage_data.py: < os.environ["XARGS"]="xargs -r" > os.environ["XARGS"]="xargs -r -s 20000" The error is triggered by a find statement in Portage's ebuild.sh: find . -mindepth 1 ! -type l -print0 | ${XARGS} -0 chmod -f a+rX,u+w,g-w though, IMHO, this looks fine. So my guess is, xargs and chmod somehow don't match anymore (dev-lang/fpc-2.0.4 forced an update to findutils-4.3.2).
Created attachment 118268 [details, diff] use chmod -R to reduce the size of the argument list This is fixed in svn r6479:6481.
I'm not sure, whether this patch induces a new, more severe bug, as chmod also changes the attributes of links. This is what the ! -type l probably was good for in the original version. Now, the find is excluding only the links in the top level directory, giving way to chmod of links in subdirectories.
According to the chmod man page, "chmod ignores symbolic links encountered during recursive directory traversals". We've used that in the past without any problems, so I'm sure it's fine. You'll get a sandbox violation if it's not.
This has been released in 2.1.2.7.