commit: 7fab3aadb4cdca35ce0d81525af1256c745308ff
Author: Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 13 18:38:36 2015 +0000
Commit: Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
CommitDate: Fri Feb 13 18:43:36 2015 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7fab3aad
Add another check for broken /dev/s (bug 538980)
Signed-off-by: Alexander Berntsen <bernalex <AT> gentoo.org>
Suggested-by: Zac Medico <zmedico <AT> gentoo.org>
ACKed-by: Zac Medico <zmedico <AT> gentoo.org>
---
pym/_emerge/main.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index f1a9e18..84094ae 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(