1 |
On Mon, 2006-08-07 at 15:27 +0100, Paul Bredbury wrote: |
2 |
> > if built_with_use sci-libs/lapack-atlas ifc; then |
3 |
> > ... |
4 |
> > die "Inconsistent Fortran compilers" |
5 |
> > fi |
6 |
> My challenge was to find an example of an ebuild which is *not* |
7 |
> installed (taking into account package.provided, thanks to my patch) but |
8 |
> which should have *positive* "built_with_use" functions. I'm still |
9 |
> waiting. |
10 |
Ah... that was an example of a package that isn't installed that |
11 |
*shouldn't* have *negative* return from built_with_use. |
12 |
|
13 |
Of course, ebuild authors shouldn't be calling built_with_use on |
14 |
non-installed packages anyway (which is to say, they should restrict the |
15 |
atom argument of built_with_use to items in USE-flattened DEPEND). |
16 |
Dying is a sensible response. |
17 |
|
18 |
> If the package is installed through package.provided, then I agree with |
19 |
> the *current* Portage behaviour of assuming that all USE flags are on. |
20 |
> Ya can't blame me for that. It's currently the only sensible choice. |
21 |
> (Funnily enough, no-one has suggested dying as an option for this). |
22 |
I would. Pending a proper resolution (USE data in package.provided), |
23 |
users can set USE in vdb. |
24 |
|
25 |
> > Does conflating two conditions to one output make sense? |
26 |
> Yes, because you are ignoring the fact that condition 2 *depends* on |
27 |
> condition 1. If a package hasn't been built, then it hasn't been built |
28 |
> with any USE flag. I've stated this several times now, and it keeps |
29 |
> being asked as if it's a new question, always with a question, never |
30 |
> something to challenge it. To turn it around in the hope that it is |
31 |
> clearer: How can you expect a package to have been built *with* a USE |
32 |
> flag when it hasn't been *built*? |
33 |
Equally, it hasn't been built *without* that USE flag. Non-self-dual, as |
34 |
I said. |
35 |
|
36 |
> If you think that what I'm saying is false, then *challenge* it. |
37 |
A true return value indicates the package was built with the USE flag |
38 |
set; a false return value that it was built with the USE flag unset. |
39 |
Tertium datur: die. ("mori"?) |
40 |
|
41 |
> > But they do expect that if "built_with_use app-foo/bar shiney" returns |
42 |
> > FALSE, then app-foo/bar was built with the "shiney" USE flag unset. |
43 |
> They are wrong. They are ignoring the perfectly valid situation that bar |
44 |
> wasn't built, whilst expecting a Boolean result anyway. |
45 |
Not valid. built_with_use should not be called on non-installed atoms. |
46 |
|
47 |
> But, explain it |
48 |
> to them, and they will understand that the program is answering as best |
49 |
> as it can. |
50 |
Guessing in exception situations creates bugs. |
51 |
|
52 |
> Try to explain to them why a program instead falls over in a |
53 |
> big heap, and you will probably have difficulty in getting paid for your |
54 |
> programming work. That's the big difference. |
55 |
None of us are getting paid. The "them" in question are fellow |
56 |
developers. |
57 |
|
58 |
> There is a big difference between a program answering as best as it can |
59 |
> (without going into the currently-impossible arena of "artificial |
60 |
> intelligence"), and falling over in a big heap. Oh I'm sorry, I mean |
61 |
> raising an exception. Like an exception is so much more useful than |
62 |
> falling over in a big heap. |
63 |
ebuild.sh exceptions have an error message and call stack. Easily enough |
64 |
to diagnose the fault. |
65 |
|
66 |
> > Insufficient information is an error condition. |
67 |
> OK, then Portage is horribly wrong in its current behaviour, because its |
68 |
> built_with_use and has_version functions don't even pretend to look at |
69 |
> package.provided, so they don't have insufficent information, so they |
70 |
> should *always* die immediately. Correct? See how logic can look stupid |
71 |
> when stated simplistically? |
72 |
vdb is preferred over package.provided. |
73 |
|
74 |
> > Paranoia much? |
75 |
> I'm trying to teach logic to schoolkids who are using the argument that |
76 |
> I'm outnumbered 5 to 1, therefore I'm wrong. This is a really crappy |
77 |
> situation to be in, for anyone who wants to improve Portage rather than |
78 |
> just be called a dick by schoolkids. |
79 |
The complement to the democratic fallacy is the autocratic fallacy. |
80 |
Which is more likely to be at work here? |
81 |
|
82 |
> > And in other circumstances? |
83 |
> |
84 |
> Tricky. I'm not going to commit to a definite answer to such a vague |
85 |
> question, because it depends. Python has the option of returning None, |
86 |
> as well as a value, which can be much more elegantly handled than an |
87 |
> exception. Dying in an ebuild, is of course a *last* resort. |
88 |
Absolutely not. When you get lost, the sooner you stop and ask for |
89 |
directions the less likely you are to get mugged. |
90 |
|
91 |
> There's also quake*1*-data, although it's practically identical to |
92 |
> quake2-data. It's just a meaningless bit of fate that this bug hits |
93 |
> something as inconsequential as an old game - it's still a Portage bug, |
94 |
> waiting to bite *any* package. No-one really cares about the bug right |
95 |
> now, because it's only games that are affected. |
96 |
Je ne comprends pas. |
97 |
|
98 |
> Don't stop now, I might end up enjoying this after all. |
99 |
What a pity. |
100 |
|
101 |
Ed |
102 |
|
103 |
-- |
104 |
gentoo-portage-dev@g.o mailing list |