From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NeJFF-00088Z-2v for garchives@archives.gentoo.org; Mon, 08 Feb 2010 02:21:01 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17B23E11D8; Mon, 8 Feb 2010 02:20:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 71A7BE10D2 for ; Mon, 8 Feb 2010 02:20:41 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 080E41B4246; Mon, 8 Feb 2010 02:20:41 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Calling unknown commands in an ebuild Date: Sun, 7 Feb 2010 21:22:00 -0500 User-Agent: KMail/1.12.4 (Linux/2.6.32.6; KDE/4.3.4; x86_64; ; ) Cc: Stelian Ionescu References: <1265577010.28554.15.camel@blackhole.cddr.org> In-Reply-To: <1265577010.28554.15.camel@blackhole.cddr.org> 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; boundary="nextPart1390560.kSR3dVczKv"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201002072122.01908.vapier@gentoo.org> X-Archives-Salt: ab3a6b7c-c741-4cc3-b53d-ff7dfe13fbc9 X-Archives-Hash: a92f5f7bdadfaa746507fc11c38baa67 --nextPart1390560.kSR3dVczKv Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 07 February 2010 16:10:10 Stelian Ionescu wrote: > Wouldn't it be a good idea to use "set -e" in the ebuild environment ? > I've seen cases of ebuilds calling epatch without inheriting from eutils > which compiled and installed (apparently) fine but possibly broken > binaries. this is not the way to approach the problem. 'set -e' has a lot of=20 implications people don't realize. _any_ command that exits with non-zero= =20 will break things. such as: matches=3D`grep foo ./some-file` no matches of 'foo' will cause the ebuild to exit immediately. it doesnt t= ake=20 much effort to find plenty of other examples. it also valid to try and do something like `foo --version >& /dev/null` as = a=20 naive test to see if a program exists and works. messing with the fundamen= tal=20 'command not found' behavior may unintentionally break this. > https://bugs.gentoo.org/buglist.cgi?quicksearch=3Dcommand+not+found > and perhaps others I haven't managed to find in bugzilla many of those would still fail with `set -e` in the ebuild environment beca= use=20 the missing command is run through a build system like makefiles. ebuild -> make -> shell -> no command found =2Dmike --nextPart1390560.kSR3dVczKv Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJLb3VJAAoJEEFjO5/oN/WBCFkQAI/8SuFm3v419WNlj0nPpuYp ukFTASC5aIv6m23kmVnj3tZfvKN8WLyiBlGqZRwylvavii2UoXYrkk57NHOcPmgf n2jpxAZn+uHxB/F65rFFtRpRUUxfeHDRMFmqa50X9ilUSudayD0ElUS6NmCX79Vr MnsGr6oj4NZB1f88s8oM3lJoUeAgS4L2Sz3SGnXjPTFH+EJHRH5Z/Xpx25kNvVZl Ugb6hNCJFSYX5aE+qrVETX0ME7+myejDUpWfrN/VL9LBGItr7gNlaBbM7KvZykhU NbVM0cW6e15JN7lqYu0M7QuyYwpC6OYYwmNSstB4l5edydjYuPv/X+WFMyy7vYCl pWFQ5qdAmWCEnowZwy92X8PsJjqx/8YsHbIFZCfr7DNx0D8IxjRzjKkSXcm+vM6Q 0rrfW1uVG2Bnx1CRqRWLKWxtt/FdIrpuWI2KPfMyzNRxSgBO9gx1Ty2Tca23g4OP AY3jm0RflMecF6jex0+As7RXuckyUkoBTf/2vBAjSdrawTmyAmWvlUxIRQVvikfH hlUBjUcQOFo4AoHoboN8IxVIKZj7wW7EhWPClx6ij5EjU5rGkxoIENDw+tYBFCdX tXLWcILh4zvB2PVUGk0jBUt1d8OM9zO8rQ9GJ62pifYvNhdK6D0BwqxArLdb5O7y BNCeMsabWtLOP6rMle8W =uc7I -----END PGP SIGNATURE----- --nextPart1390560.kSR3dVczKv--