Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Cc: George Shapovalov <george@g.o>
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: gnat.eclass
Date: Thu, 27 Sep 2007 08:51:27
Message-Id: 200709270433.50463.vapier@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: gnat.eclass by George Shapovalov
1 On Thursday 27 September 2007, George Shapovalov wrote:
2 > Thursday, 27. September 2007, Donnie Berkholz Ви написали:
3 > > > + if [[ ${profiles[@]} == "${MARKER}*" ]]; then
4 > > > + exit
5 > >
6 > > I'm surprised to see exit called in a function instead of returning
7 > > nonzero.
8 >
9 > This exit here indicates not a very usual but a valid situation, - no gnat
10 > profile has been activated yet. So, this is not an error, at least not
11 > always. But yes, returning a non zero also possible, though testing the
12 > result is not that different from testing for a non-zero string, and the
13 > latter is not intuitively percieved as an error :).
14
15 i think more to the point, ebuilds/eclasses should never be calling `exit`
16
17 if you want to "return an empty string", then you do `return`
18 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies