1 |
On Thu, 11 Nov 2004 18:07:53 -0500 Mike Frysinger <vapier@g.o> |
2 |
wrote: |
3 |
| On Thursday 11 November 2004 05:59 pm, Ciaran McCreesh wrote: |
4 |
| > nowadays certain developers are making things barf in pkg_setup |
5 |
| > instead(which IMO sucks, since any failure of this kind should |
6 |
| > happen *before* all the dependencies start to be merged). |
7 |
| |
8 |
| considering Bug 2272 is still not fixed, there isnt much choice |
9 |
| |
10 |
| does it suck ? yes |
11 |
| is there another usuable solution atm ? not really |
12 |
|
13 |
2272 isn't the only kind of problem there... That one will be fixed by |
14 |
Jason's new dep code if it's ever integrated... What's more annoying is |
15 |
packages which do something like: |
16 |
|
17 |
pkg_setup() { |
18 |
if use foo && ! use bar ; then |
19 |
eerror "You must USE bar if you USE foo" |
20 |
die "meh" |
21 |
fi |
22 |
} |
23 |
|
24 |
The way earlier packages handled it was to either treat bar as being |
25 |
enabled no matter what if foo was set or to ignore the bar flag entirely |
26 |
unless foo was set. Similarly, some packages will do things like: |
27 |
|
28 |
pkg_setup() { |
29 |
if use gtk && use qt ; then |
30 |
eerror "You cannot USE both qt and gtk" |
31 |
die "meh" |
32 |
fi |
33 |
} |
34 |
|
35 |
The traditional approach was to select whatever worked best for the |
36 |
package in question when this occured (for example, gvim will select gtk |
37 |
over motif if both are enabled). |
38 |
|
39 |
Does the old method have drawbacks? Sure. Are they less of a nuisance |
40 |
than coming back after a day to a failure message half way through a |
41 |
build of a hundred packages (many of which later turn out to be |
42 |
unnecessary thanks to USE conflicts) to find a big fat error that could |
43 |
have been determined before anything was installed at all? *shrug* |
44 |
maybe. |
45 |
|
46 |
I seem to recall sort of discussing this one with Stuart (?) and one of |
47 |
the portage guys a while back... Don't think anyone ever agreed upon |
48 |
whether a prebuild_check() {} or some scary variable would be better... |
49 |
|
50 |
-- |
51 |
Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, Sparc, Mips) |
52 |
Mail : ciaranm at gentoo.org |
53 |
Web : http://dev.gentoo.org/~ciaranm |