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