public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Aron Griffis <agriffis@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] einfo / ewarn banners and die messages
Date: Fri, 12 Nov 2004 10:30:25 -0500	[thread overview]
Message-ID: <20041112153025.GB452@time.flatmonk.org> (raw)
In-Reply-To: <4194A18E.30106@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

Aaron Walker wrote:	[Fri Nov 12 2004, 06:42:06AM EST]
> Firstly, new* shouldn't need to die since they just cp and call their do*
> counterpart, iirc.

except that we'd want to see the correct die message.

> Yes, I agree that things should install something or die, not ignore it.
> However, IMO, it is considered better style to keep all that kind of
> stuff in one place (the ebuild), just like it's usually considered
> better to handle all signals and exit code in main() of a C/C++ app.

I've made the same statement in the past.  You might reconsider that
position in the context of ebuilds.  There is quite a difference:

- In C/C++ it can be expensive to do up-front checking prior to
  calling into an API.  Additionally the exception model of C++ makes
  it natural to do error handling in the caller rather than the
  callee.  After all, how should the callee know what you want to do
  with errors?

- When calling the aforementioned commands in ebuilds, there is never
  a situation when a failure is expected.  If ever a command fails,
  the correct action is to die.  Since that is the case, there is no
  reason to put all the error-handling code in the ebuilds themselves.
  It's just a burden on ebuild writers, and instead the errors often
  get ignored.

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer


[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2004-11-12 15:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 23:45 [gentoo-dev] einfo / ewarn banners and die messages Ciaran McCreesh
2004-11-12  6:02 ` Tuan Van
2004-11-12  7:07   ` Georgi Georgiev
2004-11-12  2:11     ` Mike Gardiner
2004-11-12 11:42       ` Aaron Walker
2004-11-12 15:30         ` Aron Griffis [this message]
2004-11-13  6:08           ` Matthew Kenendy
2004-11-12 23:07             ` Mike Gardiner
2004-11-13 11:44               ` Matthew Kenendy
2004-11-13 13:58                 ` Aron Griffis
2004-11-13 14:43                 ` Georgi Georgiev
2004-11-15 11:57                   ` Paul de Vrieze
2004-11-12 11:53       ` Thomas de Grenier de Latour
2004-11-12 15:22     ` Aron Griffis
2004-11-12 16:38     ` Tuan Van
2004-11-12  8:08   ` Ciaran McCreesh
2004-11-13 17:12 ` Tom Knight
2004-11-14 17:12   ` Ciaran McCreesh
2004-11-14 22:41     ` Aron Griffis
2004-11-14 22:47       ` Ciaran McCreesh

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=20041112153025.GB452@time.flatmonk.org \
    --to=agriffis@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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