[Exherbo-dev] Alternatives descriptions

Johannes Nixdorf mixi at shadowice.org
Mon Sep 18 18:57:40 UTC 2017


On Thu, Sep 14, 2017 at 04:09:04PM +0000, Bo Ørsted Andresen wrote:
> Couple years ago support for descriptions for alternatives was introduced. E.g.:
>
> ALTERNATIVES_cc_DESCRIPTION="System-wide C compiler"
> ALTERNATIVES_vi_DESCRIPTION="Default provider for the vi text editor"
>
> in the bottom of alternatives.exlib. More alternatives need to start using this
> but it's a start. If you run `eclectic` these descriptions are shown. If you
> run `eclectic vi help` the vi alternative description is also shown.
>
> If you run `eclectic vi` it is, however, not shown. That's dumb. Attached in
> 0001-Show-description-by-default-in-eclectic-alternative-.patch for ::arbor is
> a solution to that. The normal default action is usage. Help prints the
> description and then usage. So seems okay.
>
> Additionally the desire to provide descriptions for alternative providers has
> been discussed. Attached in
> 0001-Show-contents-of-_description-file-if-it-exists-in-e.patch for ::eclectic
> and 0002-Add-alternatives_for_with_description-which-allows-s.patch for ::arbor
> is a way to show provider descriptions in `eclectic ${alternative} list`
> output.
>
> To specify provider description has been added a new
> `alternatives_for_with_descriptions` function which takes a fourth description
> argument and puts it in
> /etc/env.d/alternatives/${alternative}/${provider}/_description similar to how
> importance is stored.
>
> Does anybody have suggestions for a better name for
> `alternatives_for_with_description`? Comments?

Since zlin asked so nicely for feedback:

 a) The idea sounds good. We have descriptions for compile time
    chooseables (options) and this adds the same for runtime chooseables
    (alternatives). The same reasons as for option descriptions apply.
 b) I tested the code and it works.
 c) The name alternatives_for_with_description looks fine as is.

(Second try because apparently mail sucks.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.exherbo.org/pipermail/exherbo-dev/attachments/20170918/46ed37ff/attachment.asc>


More information about the Exherbo-dev mailing list