From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 39CCA1384B4 for ; Wed, 25 Nov 2015 16:16:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 38A8121C07F; Wed, 25 Nov 2015 16:16:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3DA6D21C00B for ; Wed, 25 Nov 2015 16:16:39 +0000 (UTC) Received: from pomiot (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 67899340656; Wed, 25 Nov 2015 16:16:37 +0000 (UTC) Date: Wed, 25 Nov 2015 17:16:24 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read Message-ID: <20151125171624.508e6b97.mgorny@gentoo.org> In-Reply-To: <1448221870-17269-4-git-send-email-mgorny@gentoo.org> References: <1448221870-17269-1-git-send-email-mgorny@gentoo.org> <1448221870-17269-4-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/cD0EgfQH2EIt/W1yyf5WBc1"; protocol="application/pgp-signature" X-Archives-Salt: 98f23c58-e8a2-480c-abc9-ff3f1a8d56fb X-Archives-Hash: 67a4af6541d2fe15b2dbaee40c116575 --Sig_/cD0EgfQH2EIt/W1yyf5WBc1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 22 Nov 2015 20:50:44 +0100 Micha=C5=82 G=C3=B3rny wrote: > --- > eclass/python-utils-r1.eclass | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass > index 0a04e12..201b0c4 100644 > --- a/eclass/python-utils-r1.eclass > +++ b/eclass/python-utils-r1.eclass > @@ -1038,12 +1038,12 @@ python_fix_shebang() { > local shebang i > local error=3D from=3D > =20 > - IFS=3D read -r shebang <"${f}" > + IFS=3D read -r shebang <"${f}" || die This gives failure for empty files. We need to revert it, and possibly find a better way of distinguishing I/O failure from 'no input' error. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/cD0EgfQH2EIt/W1yyf5WBc1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWVd7YXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOLBwQALcN6Cp+w5kJ4+chCgOJR1gN XBW2T4HKV7fXnS6IrsDqbqQzH3Kcit7bD6RyVQ5TXGYFIE3XjPofpEr9oluS6pz6 siJdpRYmRosLBctkVUzSCVCNBNmyykeR6HuYi3kMEimlyGQami6azBrqTqEA4UCs Vu6tMorezj0I88nl3wDQCbOYIRT6gQwZy90by3GfOtrWddevhbRfosn7pwt4kGwC uyfqH70DTU4prKGIgC1wW7FCVLvnI2/2ffxRM3ABFH9I1EBC9TLyljxN1ST/wS2r ahSlVXhfUUEwqm6Q++Okah7NhIW9kr2SnzVmD2QlmmGE+BS1iL2tNiTw51ExGN97 +hVgnzsTMLM+Ypby7bOxlnVqPfFAgz2CO5q7EMLAbk6YlnDRZJQrawzX8o9x6VEW dXNP+xRicMBInxbrBXcI1daE4oKVymgRDuib18UVWChNni3LnIqQsWv/0lgf8mUf UimOEUmql5k39eUickNY4vEPQoIY4t/+Ua312vScnJfWcAJicv6vJRnP8QKXo7z1 +0nxZHUw61X1vCnx95rfGge/QwDE8VdGC0kUjrqSYooa1HZJekhvcIFF8gFgFCbb qh6CnaEXz5LUoJBRLhArRwjMiIhuzp9e7j6cj9kz+vHXpv0M0oWqGZwHpSm/fDcK bwS/g0BuAXVzvZiaWAzc =jqiO -----END PGP SIGNATURE----- --Sig_/cD0EgfQH2EIt/W1yyf5WBc1--