1 |
Hi, |
2 |
|
3 |
There is a tool exactly like eselect that already exists... Its called |
4 |
alternatives and its comes with dpkg.. It might be a good idea to just |
5 |
use it... instead of re-inventing the wheel.. |
6 |
|
7 |
Olivier |
8 |
|
9 |
On Thu, 2004-04-11 at 18:21 +0000, Ciaran McCreesh wrote: |
10 |
> On Thu, 4 Nov 2004 18:02:41 +0100 Thomas de Grenier de Latour |
11 |
> <degrenier@×××××××××××.fr> wrote: |
12 |
> | 1) Write an eclass that deals with that issue in a generic way. |
13 |
> | Lets call it alternatives-symlink.eclass. What are the different |
14 |
> | alternatives is declared by the ebuild using an env var, for |
15 |
> | instance: |
16 |
> | ALTERNATIVES="/usr/bin/vi:vim /usr/bin/view:vim /usr/bin/ex:vim" |
17 |
> | (you can also use absolute path in second hand of each |
18 |
> | declaration if needed.) |
19 |
> |
20 |
> Ok, yup, at first glance I'm liking this. Dunno if it'll survive |
21 |
> scrutiny, but... If it turns out that it's worth creating a generic |
22 |
> solution to this, what should it do? Here's some rough ideas of what it |
23 |
> would need to handle... |
24 |
> |
25 |
> * Multiple versions of the same package, the way the current |
26 |
> alternatives eclass handles things. For example, I might have foo-2.2 |
27 |
> and foo-2.3 installed, and I'd need a link (not user switchable) from |
28 |
> foo to foo-2.3. This link must be handled even when packages are |
29 |
> unmerged, upgraded and so on. |
30 |
> |
31 |
> * Multiple versions of the same package with a sysadmin switchable |
32 |
> symlink between versions. Basically a generic equivalent of gcc-config. |
33 |
> |
34 |
> * Multiple packages wanting the same convenience symlink. For example, |
35 |
> vim, nvi, elvis and vi all want to provide 'vi', 'ex' and so on. This |
36 |
> should be sysadmin-switchable, but if the currently selected provider is |
37 |
> unmerged then a new default should be picked. At no point should we end |
38 |
> up with duff symlinks. |
39 |
> |
40 |
> Regarding the last point -- personally I reckon it would be better if we |
41 |
> could switch multiple packages at once through this. Like, for example, |
42 |
> a 'vi' target would set the symlinks for vi, view and ex, and a gcc |
43 |
> target would set the whole toolchain thing. |
44 |
> |
45 |
> Something like: |
46 |
> |
47 |
> # eselect --set vi vim |
48 |
> # eselect --set kernel linux-2.6.7 |
49 |
> # eselect --set gcc sparc-unknown-linux-gnu-3.3.4 |
50 |
> |
51 |
> and: |
52 |
> |
53 |
> # eselect --list kernel |
54 |
> linux-2.6.7 (*) |
55 |
> linux-2.6.8.1 |
56 |
> linux-2.6.10_rc1 |
57 |
> |
58 |
> and: |
59 |
> |
60 |
> # eselect --list |
61 |
> gcc sparc-unknown-linux-gnu-3.3.4 |
62 |
> kernel: linux-2.6.7 |
63 |
> vi: /usr/bin/vim |
64 |
> |
65 |
> could be rather cool. So... I guess the question really is, is it worth |
66 |
> making all this generic and flexible, or is it simpler to just keep the |
67 |
> current collection of blah-config tools and make more as needed? Can we |
68 |
> nick any ideas from the Debian system? Will this idea still look good |
69 |
> when I haven't had large numbers of girly foofoo drinks? |
70 |
|
71 |
-- |
72 |
Olivier Crête |
73 |
tester@g.o |
74 |
Gentoo Developer |