If emerge fails while copying files (due to partition being full?) it leaves you with an a pile of files scattered around, and a half-installed package in /var/db/pkg that you can't uninstall (named -MERGING-something ) There needs to be a clean way to uninstall the files and reclaim the disk space. emerge --unmerge -- -MERGING-something does not work. I'm thinking a --depclean should offer to uninstall such a package.
Dupe of Bug 137751 which is dupe of Bug 23851 *** This bug has been marked as a duplicate of bug 23851 ***
I'm sure that solving bug 23851 would prevent the problem I had, but are you absolutely certain that there are no other ways for emerge to fail that leave behind a -MERGING directory.
I was able to remove the package by renaming the directory in /var/db/pkg to something that did not begin with a -. Then emerge --unmerge could remove it.