Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read
Date: Wed, 25 Nov 2015 16:16:48
Message-Id: 20151125171624.508e6b97.mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read by "Michał Górny"
1 On Sun, 22 Nov 2015 20:50:44 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > ---
5 > eclass/python-utils-r1.eclass | 4 ++--
6 > 1 file changed, 2 insertions(+), 2 deletions(-)
7 >
8 > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
9 > index 0a04e12..201b0c4 100644
10 > --- a/eclass/python-utils-r1.eclass
11 > +++ b/eclass/python-utils-r1.eclass
12 > @@ -1038,12 +1038,12 @@ python_fix_shebang() {
13 > local shebang i
14 > local error= from=
15 >
16 > - IFS= read -r shebang <"${f}"
17 > + IFS= read -r shebang <"${f}" || die
18
19 This gives failure for empty files. We need to revert it, and possibly
20 find a better way of distinguishing I/O failure from 'no input' error.
21
22 --
23 Best regards,
24 Michał Górny
25 <http://dev.gentoo.org/~mgorny/>

Replies