1 |
Signed-off-by: Alexander Berntsen <bernalex@g.o> |
2 |
--- |
3 |
pym/_emerge/main.py | 9 +++++++++ |
4 |
1 file changed, 9 insertions(+) |
5 |
|
6 |
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py |
7 |
index f1a9e18..84094ae 100644 |
8 |
--- a/pym/_emerge/main.py |
9 |
+++ b/pym/_emerge/main.py |
10 |
@@ -1114,6 +1114,15 @@ def emerge_main(args=None): |
11 |
level=logging.ERROR, noiselevel=-1) |
12 |
return 1 |
13 |
|
14 |
+ # Verify that BASH process substitution works as another cheap early |
15 |
+ # filter. Process substitution uses '/dev/fd'. |
16 |
+ if portage.process.spawn_bash("[[ $(< <(echo foo) ) == foo ]]") != 0: |
17 |
+ writemsg_level("Failed to validate a sane '/dev'.\n" |
18 |
+ "bash process substitution doesn't work; this may be an " |
19 |
+ "indication of a broken '/dev/fd'.\n", |
20 |
+ level=logging.ERROR, noiselevel=-1) |
21 |
+ return 1 |
22 |
+ |
23 |
# Portage needs to ensure a sane umask for the files it creates. |
24 |
os.umask(0o22) |
25 |
emerge_config = load_emerge_config( |
26 |
-- |
27 |
2.0.5 |