Bug 449760 states a semi-random issue of: cp: cannot create directory ‘/var/tmp/portage/dev-python/pyxattr-0.5.1/image/usr’: File exists which most likely means that copying multiple trees into the same location suffers a race condition when creating necessary directories. AFAICS, make_dir_parents_private() does fail on every mkdir() failure: if (mkdir (dir, mkdir_mode) != 0) { error (0, errno, _("cannot make directory %s"), quote (dir)); return false; } In this case, it'd be probably enough if it checked for EEXIST and restat()-ed the directory instead. Or just ignored the error and tried to copy/mkdir more waiting for ENOTDIR.
pretty sure it's been this way forever. not sure if it should bother with stating and forcing the mode bits to the expected if someone is doing things in parallel. make that the user's problem.
should be all set now in the tree; thanks for the report! Commit message: Fix parallel recursive cp errors w/mkdir http://sources.gentoo.org/gentoo/src/patchsets/coreutils/8.20/040_all_coreutils-cp-mkdir-eexist.patch?rev=1.1 http://sources.gentoo.org/sys-apps/coreutils/coreutils-8.20-r2.ebuild?rev=1.1