Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: "Alin Năstac" <mrness@g.o>
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in mail-filter/dspam: ChangeLog dspam-3.8.0-r7.ebuild
Date: Mon, 01 Oct 2007 07:34:33
Message-Id: 20071001072249.GU28813@supernova
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in mail-filter/dspam: ChangeLog dspam-3.8.0-r7.ebuild by "Alin Năstac"
1 On 10:11 Mon 01 Oct , Alin Năstac wrote:
2 > In this case, $(use mysql || use postgres && use_enable virtual-users)
3 > will result in use_enable virtual-users being executed if and only if
4 > USE="-mysql postgres". See this pseudocode:
5
6 No .... if use mysql succeeds, || use postgres is skipped entirely and
7 we go straight to the && use_enable. It's considered directly in order
8 with no precedence.
9
10 To stretch it out:
11
12 if use mysql; then # skip || use postgres
13 enable virtual-users
14 if ! use mysql; then # run OR: use postgres
15 if use postgres; then
16 enable virtual-users
17 fi
18 fi
19
20 > if use mysql do nothing
21 > else if use postgres
22 > use_enable virtual
23 >
24 > Wouldn't be best to die in pkg_setup if USE="virtual-users -mysql
25 > -postgres" ?
26
27 It's better to do something smart than to force interactivity. In this
28 case, you as the maintainer would decide whether this USE combo meant
29 the user wanted virtual-users (if so, forcibly enable one of mysql or
30 postgres), or whether the user definitely did not want to pull in a
31 database (if so, force off virtual-users).
32
33 Thanks,
34 Donnie
35 --
36 gentoo-dev@g.o mailing list

Replies