1 |
I was doing a fresh Gentoo install today, following the manual, and it |
2 |
appeared to me that the manual suggests to install a "logger" and a |
3 |
"cron", and gives some defacto suggestions. |
4 |
|
5 |
However, the available packages that provide this facility(s) are not |
6 |
overly obvious from a portage standpoint. |
7 |
|
8 |
The best index I can find presently for a list of things that provide |
9 |
these facilities are virtual/cron , and virtual/logger , and only then |
10 |
by perusing the source. |
11 |
|
12 |
And if you tell somebody to install "virtual/cron", you'll get the |
13 |
first thing in the ||( ) list, not an elective choice of which to |
14 |
install. |
15 |
|
16 |
It makes sense to me that there are some circumstances, where it makes |
17 |
sense to, instead of simply picking the first match, present the user |
18 |
with the option of one of them ( somehow ). |
19 |
|
20 |
ie: emerge -pv virtual/cron could, instead of the current behaviour |
21 |
of installing vixie-cron,show a list with the non-chosen alternatives: |
22 |
|
23 |
What we presently get is this: |
24 |
|
25 |
[ebuild N ] sys-process/vixie-cron-4.1-r12 USE="pam -debug |
26 |
(-selinux)" 0 kB |
27 |
[ebuild N ] virtual/cron-0 0 kB |
28 |
|
29 |
Where it might be nice to instead give: |
30 |
|
31 |
[ebuild N ] sys-process/vixie-cron-4.1-r12 USE="pam -debug |
32 |
(-selinux)" 0 kB |
33 |
[ebuild ? ] sys-process/cronie-1.4.8 USE="inotify pam" ( virtual/cron ) |
34 |
[ebuild ? ] sys-process/dcron-4.5 44 kB ( virtual/cron ) |
35 |
[ebuild ? ] sys-process/fcron-3.0.6-r1 USE="pam -debug |
36 |
(-selinux)" LINGUAS="-fr" 540 kB ( virtual/cron ) |
37 |
[ebuild ? ] sys-process/bcron-0.09 57 kB ( virtual/cron ) |
38 |
[ebuild N ] virtual/cron-0 0 kB |
39 |
|
40 |
As a way to show that vixie-cron is being chosen as the default, but |
41 |
there are other things that can optionally provide that virtual too. |
42 |
|
43 |
(* important: dependent children of the alternatives should not be |
44 |
computed or displayed, as this will only add confusion, not to mention |
45 |
headaches, as all the above crons have blockers on each other to stop |
46 |
them being installed together ) |
47 |
|
48 |
This is the "Simplest" option I could think of that made it more "User |
49 |
facing" that these virtuals exist to provide a given feature using a |
50 |
mechanism of the users choice. |
51 |
|
52 |
You could take this further and make an interactive choice system, |
53 |
which was only presented in certain conditons, ie: if the ||( ) |
54 |
condition was not already satisfied, or if the users command indicated |
55 |
they want to choose virtuals themselves: |
56 |
|
57 |
emerge --virtuals=auto # current behaviour |
58 |
emerge --virtuals=pick-missing # interactive choice only if the |
59 |
conditionals are not already satisfied |
60 |
emerge --virtuals=pick-specified # interactive choice only for |
61 |
virtuals listed on the invocation line |
62 |
emerge --virtuals=pick-all # interactive choice every time |
63 |
|
64 |
Theres possibly other avenues I haven't thought of that might also be useful. |
65 |
|
66 |
The pick interface could be something like |
67 |
|
68 |
virtual/cron can be provided by one of the following |
69 |
1) sys-process/vixie-cron (4.1-r12): Paul Vixie's cron daemon, a |
70 |
fully featured crond implementation |
71 |
2) sys-process/bcron (0.09): A new cron system designed with |
72 |
secure operations in mind by Bruce Guenter |
73 |
3) sys-process/cronie (1.4.8): Cronie is a standard UNIX daemon |
74 |
cron based on the original vixie-cron. |
75 |
4) sys-process/dcron (4.5): A cute little cron from Matt Dillon |
76 |
5) sys-process/fcron (3.0.6-r1): A command scheduler with extended |
77 |
capabilities over cron and anacron |
78 |
choice[1]: |
79 |
|
80 |
*( list taken liberally from eix -c ) |
81 |
|
82 |
Then the documentation could be updated to simply tell the user |
83 |
|
84 |
emerge --virtuals=pick-specified virtual/cron virtual/logger |
85 |
|
86 |
And they could then just use the defaults ( by pressing enter ), or |
87 |
choosing their favourite. |
88 |
|
89 |
Also, perhaps "Virtuals" is a poor name for what mechanism I am |
90 |
describing. There are potentially many things that want an elective |
91 |
process like this on many packages, but it seems a mechanism more |
92 |
prevalent in virtuals. Especially as this facility is mostly provided |
93 |
by the "USE" mechanism in most other places. However, in VIRTUALS |
94 |
where you have a list of mutually exclusive alternates, a long list of |
95 |
USE flags with one of them defaulted via IUSE seems bad. Not to |
96 |
mention, the mechanism for displaying what each individual USE flag |
97 |
will get you is a bit messy at present. ( Being, you have to invoke |
98 |
some other portage command, and this requires you finding applicable |
99 |
documentation for that command, to work out how to query what each |
100 |
individual USE flag means , and then run a different command for each |
101 |
package you want to consider to see its description ) |
102 |
|
103 |
|
104 |
-- |
105 |
Kent |
106 |
|
107 |
perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, |
108 |
3 ) for ( 9,8,0,7,1,6,5,4,3,2 );" |
109 |
|
110 |
http://kent-fredric.fox.geek.nz |