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 1NeHvR-0000xR-9V for garchives@archives.gentoo.org; Mon, 08 Feb 2010 00:56:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CDAA5E0E6A; Mon, 8 Feb 2010 00:56:26 +0000 (UTC) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by pigeon.gentoo.org (Postfix) with ESMTP id C4F3EE0E20 for ; Mon, 8 Feb 2010 00:56:20 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id A60EADD9BC; Sun, 7 Feb 2010 19:56:20 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 07 Feb 2010 19:56:20 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version; s=smtpout; bh=F/3vFscfqFZ5tnQY7JoB7vM/o18=; b=P4O0yMfxO8SBOGHwMEgMnWkbZFJN4wB9TZC0X0nBwWRNZWa7rXfQHIn+hGuGTCoXHUUvauFOd8g7FQPLTfsUMIjXafq/5TqJB8VREtugk/sHzQguHp8As18/H2KwWPX78FtbC9mY21AEYHjkWMWuIRwAZl5fkHduZ/DczYNkmHU= X-Sasl-enc: wtqVCbBIWpq41mmH1636YImdraEdPuHjz7D3bKwPpcS3 1265590580 Received: from [10.1.1.2] (88-149-210-122.dynamic.ngi.it [88.149.210.122]) by mail.messagingengine.com (Postfix) with ESMTPSA id 01A144A9A3A for ; Sun, 7 Feb 2010 19:56:19 -0500 (EST) Subject: Re: [gentoo-dev] Calling unknown commands in an ebuild From: Stelian Ionescu To: gentoo-dev@lists.gentoo.org In-Reply-To: <4B6F3C7F.700@gentoo.org> References: <1265577010.28554.15.camel@blackhole.cddr.org> <4B6F3C7F.700@gentoo.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-swIry4T4kYAjJ/mmQNX3" Date: Mon, 08 Feb 2010 01:56:17 +0100 Message-ID: <1265590577.28554.23.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 X-Mailer: Evolution 2.28.2 X-Archives-Salt: c6594e75-fe0a-473c-88cd-485078ba78f6 X-Archives-Hash: 4895ce59d79efeb20fae0afe62307db8 --=-swIry4T4kYAjJ/mmQNX3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2010-02-07 at 14:19 -0800, Zac Medico wrote: > On 02/07/2010 01:10 PM, 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 eutil= s > > which compiled and installed (apparently) fine but possibly broken > > binaries. Examples of cases where "set -e" would have helped: 303849, > > 297063, 260279, 221257, > > https://bugs.gentoo.org/buglist.cgi?quicksearch=3Dcommand+not+found > > and perhaps others I haven't managed to find in bugzilla >=20 > I don't know what kind of side-effects set -e would introduce, but > we can easily add a repoman check for epatch calls without eutils > inherit. "Exit immediately if a pipeline (which may consist of a single simple command), a subshell command enclosed in parentheses, or one of the commands executed as part of a command list enclosed by braces (see SHELL GRAMMAR above) exits with a non-zero status. The shell does not exit if the com- mand that fails is part of the command list immediately following a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the command's return value is being inverted with !. A trap on ERR, if set, is executed before the shell exits. This option applies to the shell environment and each subshell environment separately (see COMMAND EXECUTION ENVIRONMENT above), and may cause subshells to exit before executing all the commands in the subshell." > Portage already does a search of the build log for 'command not > found' messages and generates a QA warnings. Set > PORTAGE_ELOG_CLASSES=3D"${PORTAGE_ELOG_CLASSES} qa" in /etc/make.conf > if you want to have those warnings logged. My point is that whenever the ebuild is trying to execute a command that does not exist, it should die immediately because there's no way to know how the failure to execute that command might affect the rest of the build process epatch was just an example because it's probably the most used function from eutils.eclass --=20 Stelian Ionescu a.k.a. fe[nl]ix Quidquid latine dictum sit, altum videtur. http://common-lisp.net/project/iolib --=-swIry4T4kYAjJ/mmQNX3 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) iEYEABECAAYFAktvYTEACgkQjWsER8+9ASW7IQCbBFbzVQKVq0ZPhvmganZ1/QuH Cg0An386Z2syoJscHq0Ql91qaeSNAOSU =hRD9 -----END PGP SIGNATURE----- --=-swIry4T4kYAjJ/mmQNX3--