1 |
On Sun, 06 Aug 2006 22:15:33 +0100 |
2 |
Paul Bredbury <brebs@××××.com> wrote: |
3 |
|
4 |
> > There is a function built_with_use(). |
5 |
> > That function reports whether something was built with or without a |
6 |
> > specific USE flag. |
7 |
> > The sentence above includes the fragment 'was built with or |
8 |
> > without'. So it was built. |
9 |
> > Uh, oh, but it wasn't built!!?!? |
10 |
> > -> Error |
11 |
> |
12 |
> Your logic is flawed. This is what it should be: |
13 |
|
14 |
Simon is correct, it's your logic that is flawed. |
15 |
|
16 |
present => USE=foo |
17 |
|
18 |
where present = FALSE, is TRUE no matter whether USE=foo is TRUE or |
19 |
FALSE. |
20 |
|
21 |
> The question is: "Was this package built, *with* a particular USE |
22 |
> flag?" (note my emphasis, to try to make things clearer.) |
23 |
|
24 |
You're stating the answer you want in your question. We've explained |
25 |
that you are asking a different question to the one built_with_use is |
26 |
answering. built_with_use is indicating the result of "present => |
27 |
USE=foo"; the answer to that question when present=FALSE is always TRUE. |
28 |
|
29 |
It's not a good idea to embed more logic than necessary into these |
30 |
functions; it's best when they do one job only. What you're asking for |
31 |
is to embed the has_version check into built_with_use, which would |
32 |
prevent built_with_use being used in any way other than the one you have |
33 |
thought of. |
34 |
|
35 |
-- |
36 |
Kevin F. Quinn |