#100385 debconf: feature to auto-fill a selection list

#100385#5
Date:
2001-06-10 12:53:07 UTC
From:
To:
This is about helping to solve a problem with select questions having
to present choices from several packages (window managers, keymaps,
etc.).

Currently the config scripts in each package have to fill the Choices
field when installed, and clear it from their items when removed.  It
is simple enough to let the config scripts handle this for
single-question one-item-per-pakage issues, like the window-managers
example, but it adds a good deal of complexity to others, like the
keymaps setup.

What I'd like to see is a mechanism by which we would declare list
items bound to a (multi)select question, in much the same way we
currently declare questions.


A minimal implementation could be to add a select-autofill type of
question (named /the/question in this example), and auto-fill the
choices from all questions found from appending a "-items/*" pattern
to the question name (in my example /the/question-items/foo,
/the/question-items/bar, etc.).

The choices labels could be found in the short description (or a new
field) of the items, so as not to be constrained by the allowed chars
in the question name, and so as to be translatable.


Anyhow, at least a way of querying what questions are available under,
say, console-data/keymap/families/ would be greatly useful, in
multi-level questions like the keymaps one, to help ensuring the
choices in console-data/keymap/family match the possible questions for
the next one.  That would help to prevent corruptions of the question,
much like the test "$owners == $choices" allows to do for the
window-managers setup.