From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Stelian Ionescu <sionescu@cddr.org>
Subject: Re: [gentoo-dev] Calling unknown commands in an ebuild
Date: Sun, 7 Feb 2010 21:22:00 -0500 [thread overview]
Message-ID: <201002072122.01908.vapier@gentoo.org> (raw)
In-Reply-To: <1265577010.28554.15.camel@blackhole.cddr.org>
[-- Attachment #1: Type: Text/Plain, Size: 1191 bytes --]
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
implications people don't realize. _any_ command that exits with non-zero
will break things. such as:
matches=`grep foo ./some-file`
no matches of 'foo' will cause the ebuild to exit immediately. it doesnt take
much effort to find plenty of other examples.
it also valid to try and do something like `foo --version >& /dev/null` as a
naive test to see if a program exists and works. messing with the fundamental
'command not found' behavior may unintentionally break this.
> https://bugs.gentoo.org/buglist.cgi?quicksearch=command+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 because
the missing command is run through a build system like makefiles.
ebuild -> make -> shell -> no command found
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2010-02-08 2:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 21:10 [gentoo-dev] Calling unknown commands in an ebuild Stelian Ionescu
2010-02-07 22:19 ` Zac Medico
2010-02-08 0:56 ` Stelian Ionescu
2010-02-08 1:45 ` Tomas Touceda
2010-02-08 2:24 ` Mike Frysinger
2010-02-08 7:48 ` Rémi Cardona
2010-02-08 10:18 ` Peter Volkov
2010-02-08 2:22 ` Mike Frysinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201002072122.01908.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=sionescu@cddr.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox