The Prefix-enabled Portage tries to invoke Bash as "/bin/bash", even though it just bootstrapped its own new version into PREFIX. Reproducible: Always Steps to Reproduce: 1. Try to bootstrap Prefix. 2. At the start of stage2, the bootstrap-prefix.sh script runs `emerge sys-devel/gnuconfig`. Actual Results: If `/bin/bash` doesn't exist, the command fails and prints: ``` Failed to validate a sane '/dev'. bash process substitution doesn't work; this may be an indication of a broken '/dev/fd'. ``` The message is misleading, the actual culprit is that `portage.process.spawn_bash()` doesn't work – it failed while testing process substitution, but any other command would have failed as well. The test had STDERR redirected to /dev/null, but when running it in Python REPL without the redirection, it prints a message starting with `[Errno 2] No such file or directory: b'/bin/bash'`. The problematic part is `BASH_BINARY` in lib/portage/const.py, which is always defined as "/bin/bash". It should be patched to point to somewhere in the PREFIX. Expected Results: Emerge should invoke the bootstrapped Bash from the prefix. When the BASH_BINARY variable is manually edited to point there, Portage works. The problem was discovered on HP-UX 11.11 @ HP-PA, but it doesn't seem to be platform dependent.
A hardcoded path to `bash` is also present in `ecompress` and `estrip`, resulting in `/opt/gentoo/tmp/usr/lib/portage/bin/ecompress: cannot execute: required file not found` errors when emerging files.