Gentoo Archives: gentoo-dev

From: Danny van Dyk <kugelfang@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] QA Roles v2
Date: Sat, 04 Mar 2006 14:47:13
Message-Id: 200603041545.02764.kugelfang@gentoo.org
In Reply to: Re: [gentoo-dev] QA Roles v2 by Thomas de Grenier de Latour
1 Hi Thomas,
2
3 Am Samstag, 4. März 2006 14:24 schrieb Thomas de Grenier de Latour:
4 > One point of view on this issues is that the ebuilds are wrong, because
5 > they are abusing the said USE flags, and they should rather die. Imho,
6 > it makes sense, but if such a strict policy was applied to every
7 > ebuilds which atm are abusing flags this way, it would become really
8 > hard to put anything in the make.conf USE variable without breaking
9 > "emerge -uD world".
10
11 Just to throw in my 2 cents into this discussion: I'm all against die-ing
12 during the update process. However, i think that stopping before the update
13 process would be the best solution at hand. I'd like to propose the addition
14 of a dedicated USE conflict detection to ebuilds which need it.
15
16 This detection function (for example pkg_prepare()) must be executed for every
17 package in the depgraph right after the depgraph has been built and has only
18 the possibility to either mark the package as 'go' or 'no-go'. In case that
19 any package has been marked as 'no-go', the whole process stops.
20
21 A possible implementation from the build side could look like this:
22
23 # the next two functions would be candidates for eutils.eclass
24 emutexuse() {
25 eerror "The following USE flags are mutually exclusive:"
26 eerror "${@}"
27 eerror "Please choose only one of the above and disable the remaining"
28 eerror "USE flags. For additional information about this problem, see"
29 eerror "http://www.gentoo.org/<some place to store add. info about this>"
30 echo
31 }
32
33 emissinguse() {
34 eerror "In order to enable the ${2} USE flag you need also to enable"
35 eerror "the ${1} USE flag. For additional information ...."
36 echo
37 }
38
39 pkg_prepare() {
40 local ret=0
41 if use foo && use bar ; then
42 emutexuse foo bar
43 ret=1
44 fi
45 if use fnord2 && ! use fnord ; then
46 emissinguse fnord fnord2
47 ret=1
48 fi
49
50 return ${ret}
51 }
52
53 Comments?
54
55 Danny
56 --
57 Danny van Dyk <kugelfang@g.o>
58 Gentoo/AMD64 Project, Gentoo Scientific Project
59
60 --
61 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] QA Roles v2 Jason Stubbs <jstubbs@g.o>
Re: [gentoo-dev] QA Roles v2 Stuart Herbert <stuart.herbert@×××××.com>
Re: [gentoo-dev] QA Roles v2 Mark Loeser <halcy0n@g.o>
Re: [gentoo-dev] QA Roles v2 Paul de Vrieze <pauldv@g.o>