Gentoo Archives: gentoo-portage-dev

From: Paul Bredbury <brebs@××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] has_version and built_with_use ignore package.provided
Date: Mon, 07 Aug 2006 14:28:47
Message-Id: 1154960874.19527.25.camel@localhost
In Reply to: Re: [gentoo-portage-dev] has_version and built_with_use ignore package.provided by Edward Catmur
1 > if built_with_use sci-libs/lapack-atlas ifc; then
2 > ...
3 > die "Inconsistent Fortran compilers"
4 > fi
5
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
11 If the package is installed through package.provided, then I agree with
12 the *current* Portage behaviour of assuming that all USE flags are on.
13 Ya can't blame me for that. It's currently the only sensible choice.
14 (Funnily enough, no-one has suggested dying as an option for this).
15
16 > Does conflating two conditions to one output make sense?
17
18 Yes, because you are ignoring the fact that condition 2 *depends* on
19 condition 1. If a package hasn't been built, then it hasn't been built
20 with any USE flag. I've stated this several times now, and it keeps
21 being asked as if it's a new question, always with a question, never
22 something to challenge it. To turn it around in the hope that it is
23 clearer: How can you expect a package to have been built *with* a USE
24 flag when it hasn't been *built*?
25
26 If you think that what I'm saying is false, then *challenge* it.
27
28 > But they do expect that if "built_with_use app-foo/bar shiney" returns
29 > FALSE, then app-foo/bar was built with the "shiney" USE flag unset.
30
31 They are wrong. They are ignoring the perfectly valid situation that bar
32 wasn't built, whilst expecting a Boolean result anyway. But, explain it
33 to them, and they will understand that the program is answering as best
34 as it can. Try to explain to them why a program instead falls over in a
35 big heap, and you will probably have difficulty in getting paid for your
36 programming work. That's the big difference.
37
38 There is a big difference between a program answering as best as it can
39 (without going into the currently-impossible arena of "artificial
40 intelligence"), and falling over in a big heap. Oh I'm sorry, I mean
41 raising an exception. Like an exception is so much more useful than
42 falling over in a big heap.
43
44 > Insufficient information is an error condition.
45
46 OK, then Portage is horribly wrong in its current behaviour, because its
47 built_with_use and has_version functions don't even pretend to look at
48 package.provided, so they don't have insufficent information, so they
49 should *always* die immediately. Correct? See how logic can look stupid
50 when stated simplistically?
51
52 > Paranoia much?
53
54 I'm trying to teach logic to schoolkids who are using the argument that
55 I'm outnumbered 5 to 1, therefore I'm wrong. This is a really crappy
56 situation to be in, for anyone who wants to improve Portage rather than
57 just be called a dick by schoolkids.
58
59 > And in other circumstances?
60
61 Tricky. I'm not going to commit to a definite answer to such a vague
62 question, because it depends. Python has the option of returning None,
63 as well as a value, which can be much more elegantly handled than an
64 exception. Dying in an ebuild, is of course a *last* resort.
65
66 There's also quake*1*-data, although it's practically identical to
67 quake2-data. It's just a meaningless bit of fate that this bug hits
68 something as inconsequential as an old game - it's still a Portage bug,
69 waiting to bite *any* package. No-one really cares about the bug right
70 now, because it's only games that are affected.
71
72 Don't stop now, I might end up enjoying this after all.
73 --
74 gentoo-portage-dev@g.o mailing list

Replies