Portage's logic to detect read-only filesystems (lib/portage/util/writeable_check.py) is broken because it incorrectly assumes that the st_dev value returned by stat() matches only one of the filesystems listed in /proc/self/mountinfo. This assumption is incorrect because bind mounts share the st_dev value of their parent, but have an independent read-only/read-write status. (There may be other scenarios where the assumption fails, for example with btrfs snapshots.) This isn't a huge issue because this whole check will only be triggered when Portage has already detected that a directory isn't writable -- so in general, when this bug is triggered, there's indeed a reason to abort the merge, Portage just does so with a nonsensical error message. For example, I ran into this when I tried to emerge openssh -- /var/empty wasn't writable due to a problem on my system, but instead of exiting with the error message "Hey, I can't write /var/empty", Portage instead complained that /home/www/packages (a read-only bind mount from /var/portage/distfiles) was mounted read-only.