Gentoo Archives: gentoo-dev

From: Ryan Hill <dirtyepic@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Remaining PMS todo list etc
Date: Fri, 21 Mar 2008 18:17:39
Message-Id: fs0u32$ct0$1@ger.gmane.org
In Reply to: Re: [gentoo-dev] Re: Remaining PMS todo list etc by Ciaran McCreesh
1 Ciaran McCreesh wrote:
2 > On Thu, 20 Mar 2008 18:02:31 -0600
3 > Ryan Hill <dirtyepic@g.o> wrote:
4 >>> How about just checking EUID == 0 in src_test and skip the tests
5 >>> (with a ewarn message) if it doesn't match your needs?
6 >> I thought I remembered someone raising a stink about checking
7 >> permissions being a race condition because the condition can change
8 >> between the checking and performing the action. Maybe that was only
9 >> about write permissions...
10 >
11 > That's in cases like if [[ -w foo ]] ; then blah foo ; fi . Checking a
12 > variable that's constant for the phase is not racy.
13 >
14 >> If checking EUID is an acceptable method,
15 >> it should be relatively simple to write an eclass to handle the
16 >> common cases and have ebuilds use that instead of checking $FEATURES
17 >> (which i do think is a bug).
18 >
19 > Does it really need an eclass for something so simple?
20
21 Considering the number of ebuilds that check FEATURES, disable tests altogether,
22 or just do nothing and fail for half our users, against the number that do it
23 correctly... apparently yeah. The simpler we make it to use, the more people
24 will use it.
25
26 On the other hand, it might be better to just document the common cases along
27 with some example code in the Dev Guide. I'd be happy with doing that.
28
29
30 --
31 fonts, gcc-porting, by design, by neglect
32 mips, treecleaner, for a fact or just for effect
33 wxwidgets @ gentoo EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662

Attachments

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