1 |
Hi, |
2 |
Since there was no contact given and the GSoC2009 wiki page said the mailing |
3 |
list is the place to ask about it, I decided to put my questions here. |
4 |
|
5 |
I'm a bit curious about the project idea. I'm thinking, that one could use |
6 |
module[1] as an inspiration. And to create a "emodule" system, some what |
7 |
analog to the ebuilds portage uses. These emodules would be installed (and |
8 |
removed automatically) by packages that provide/utilize eselect functionality. |
9 |
I'm thinking about using basically the same structure as module[1], that is: |
10 |
|
11 |
$ eselect use python/2.5/2.5.7-r7 |
12 |
Selecting python/2.5/2.5.7-r7...done |
13 |
$ eselect show python |
14 |
python/2.5 |
15 |
SU python/2.5/2.5.7-r7 |
16 |
python/2.5/2.5.7-r8 |
17 |
python/3.0 |
18 |
python/3.0/3.0-r1 |
19 |
$ eselect use python/3.0 |
20 |
Selecting python/3.0/3.0-r1 (latest version for python/3.0)...done |
21 |
$ eselect show python |
22 |
python/2.5 |
23 |
S python/2.5/2.5.7-r7 |
24 |
python/2.5/2.5.7-r8 |
25 |
python/3.0 |
26 |
U python/3.0/3.0-r1 |
27 |
|
28 |
listing 1: an example says more than a picture expressed in words ;) |
29 |
note: this is a fictional example, since we can't have |
30 |
two installed versions of the same slot via portage. |
31 |
|
32 |
Where the "first level" (read: "python/") is the emodule name. |
33 |
The second (read "2.5" and "3.0") is the equivalent to slots in ebuilds |
34 |
(possibly required to match, but that's a later design choice - one could |
35 |
imagine that app/foo:1 installs /usr/bin/foo-static and /usr/bin/foo-dynamic |
36 |
and a /usr/bin/foo symlink to one of the, here eselect could control that |
37 |
symlink). |
38 |
The third level (read: "the final version numbers") is the "absolute emodule |
39 |
name". |
40 |
Selecting by first or second level should select the latest version available. |
41 |
In the example above "eselect use python" would select python/3.0/3.0-r1. |
42 |
Where as "eselect use python/2.5" would select python/2.5/2.5.7-r8. |
43 |
|
44 |
eselect would have 2 modes, system and user (user being default). The |
45 |
difference could be that system ("S") would control the system default - i.e. |
46 |
what version /usr/bin/python is, where as user ("U") would control "env |
47 |
python" (i.e. what python you get when just typing "python" in the shell). |
48 |
The user part could be implemented by use of $SOME_EMODULE_DIR/module/x/y/bin |
49 |
where a symlink with the generic name links to the correct version, or |
50 |
possibly is the real app. (in the python example |
51 |
$SOME_EMODULE_DIR/module/3.0/3.0-r1/bin/python would link to |
52 |
/usr/bin/python3.0). |
53 |
<off-topic> |
54 |
afaik one should actually prefer "/usr/bin/env interprenter" over an absolute |
55 |
path for the shebang in shell scripts, with the exception of /bin/sh or |
56 |
/bin/bash and when one "knows" that the absolute path _really is_ the one we |
57 |
want/need. (eg /usr/bin/python3.0 for version 3) - ie prepending "dummy-bin/" |
58 |
folders in PATH "selects" which python elf to use. |
59 |
</off-topic> |
60 |
|
61 |
And just like module[1] eselect would have the distinction of use for this |
62 |
session (cf. "module add" or "module load") and for future sessions (cf. |
63 |
"module initadd"). The later might require more extensive work (i.e. ensure |
64 |
some part of eselect is run when starting shells so paths, etc, can be set - |
65 |
though, this might create an noticeable overhead for starting shells). |
66 |
|
67 |
|
68 |
I regularly come across the module found on the Solaris machines at LiU and |
69 |
think the general concept of module is nice/handy. |
70 |
I think that one could make it more user friendly by for instance flagging |
71 |
some of the emodules as system (or derive that from emodule scripts, e.g. |
72 |
.opengl selection would be marked system since admin rights is needed to do |
73 |
the actual 'selection') |
74 |
For regular users the system modules would be hidden, reducing the module list |
75 |
somewhat. |
76 |
Further more, by trying to make the use as intuitively as possible (eg not |
77 |
the confusing "module add" and "module load", which do the same, but instead |
78 |
name it "eselect use" or "emodule use"). I think simply using sane naming |
79 |
would make it more user friendly. |
80 |
But I think there's a intrinsic problem that usability will decrease as more |
81 |
modules exist to choose from (all the user sees is a 500 line list of text and |
82 |
numbers instead of 500 choices). For the most user friendliness increase would |
83 |
be to create a simple GUI which could present the choices in a better way |
84 |
(note: the GUI would be a complementary aid, the CLI would be the backend |
85 |
driving it all). |
86 |
|
87 |
I can't quite make any sense of what this line in the idea description means: |
88 |
"There's eclectic in Exherbo so probably should just switch to that. In that |
89 |
case not enough work here for GSoC.". |
90 |
- Maybe it's just my english that's failing or there's words missing there. |
91 |
|
92 |
[1] <http://modules.sf.net> the module mentioned in the wiki proposal |
93 |
|
94 |
Best Regards |
95 |
Fredrik |
96 |
|
97 |
P.S. perhaps a short description of me would be fun: |
98 |
My name's Fredrik Klasson (aka scientica or mojibake), after a soft start to |
99 |
university studies with a year of japanese studies I revealed my true colors |
100 |
and started studying computer science at Linköpings Universtitet (Sweden). I'm |
101 |
currently in my 3rd year with the aim at a Master of Science (2 yrs) with a |
102 |
major in CS (due to the Bologna process and transitional regulations I'm not |
103 |
sure exactly what the formal title will be in the end, but it's lot's of fun |
104 |
CS - the important part is what I learn not what the business-card says :) |
105 |
I came across the "Universal select tool" GSoC idea via the wiki linked from |
106 |
an Gentoo Linux News news feed, and thought it was an interesting idea worth |
107 |
thinking about. |
108 |
-- |
109 |
After all, if you are in school to study computer science, then a professor |
110 |
saying "use this proprietary software to learn computer science" is the |
111 |
same as English professor handing you a copy of Shakespeare and saying |
112 |
"use this book to learn Shakespeare without opening the book itself." |
113 |
-- Bradley Kuhn |