aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/main.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index f1a9e18e5..84094ae76 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1114,6 +1114,15 @@ def emerge_main(args=None):
level=logging.ERROR, noiselevel=-1)
return 1
+ # Verify that BASH process substitution works as another cheap early
+ # filter. Process substitution uses '/dev/fd'.
+ if portage.process.spawn_bash("[[ $(< <(echo foo) ) == foo ]]") != 0:
+ writemsg_level("Failed to validate a sane '/dev'.\n"
+ "bash process substitution doesn't work; this may be an "
+ "indication of a broken '/dev/fd'.\n",
+ level=logging.ERROR, noiselevel=-1)
+ return 1
+
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)
emerge_config = load_emerge_config(