Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] Add another check for broken /dev/s (bug 538980)
Date: Fri, 13 Feb 2015 18:42:16
Message-Id: 54DE457D.2020505@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] Add another check for broken /dev/s (bug 538980) by Alexander Berntsen
1 On 02/13/2015 10:39 AM, Alexander Berntsen wrote:
2 > Signed-off-by: Alexander Berntsen <bernalex@g.o>
3 > ---
4 > pym/_emerge/main.py | 9 +++++++++
5 > 1 file changed, 9 insertions(+)
6 >
7 > diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
8 > index f1a9e18..84094ae 100644
9 > --- a/pym/_emerge/main.py
10 > +++ b/pym/_emerge/main.py
11 > @@ -1114,6 +1114,15 @@ def emerge_main(args=None):
12 > level=logging.ERROR, noiselevel=-1)
13 > return 1
14 >
15 > + # Verify that BASH process substitution works as another cheap early
16 > + # filter. Process substitution uses '/dev/fd'.
17 > + if portage.process.spawn_bash("[[ $(< <(echo foo) ) == foo ]]") != 0:
18 > + writemsg_level("Failed to validate a sane '/dev'.\n"
19 > + "bash process substitution doesn't work; this may be an "
20 > + "indication of a broken '/dev/fd'.\n",
21 > + level=logging.ERROR, noiselevel=-1)
22 > + return 1
23 > +
24 > # Portage needs to ensure a sane umask for the files it creates.
25 > os.umask(0o22)
26 > emerge_config = load_emerge_config(
27 >
28
29 LGTM.
30 --
31 Thanks,
32 Zac

Replies