[Grml] Re: Wish grml scripts honor/use debconf method

- Tong - mlist4suntong at yahoo.com
Sun Apr 22 22:54:40 CEST 2007


On Sun, 22 Apr 2007 11:57:59 +0200, Michael Prokop wrote:

>> Is it possible for grml scripts to use the debconf's method to
>> interact with the user? I mean, debconf allows us to define the
>> frontend that we feel most comfortable to use, be it readline,
>> dialog or xdialog, etc.
> 
>> Seems currently all grml scripts uses dialog. It looks nice, but I
>> have to say I really hate dialog. I prefer readline, nice and simple.
>> And most importantly, it leave a clear trace of what questions were
>> asked and what choice/answers I've made.
> 
> ,---- [ http://www.fifi.org/doc/debconf-doc/tutorial.html ]
> | Debconf should be used whenever your package needs to output
> | something to the user, or ask a question. I'll assume you already
> | have a package that does this and you want to convert it to use
> | debconf.
> `----
> 
> For me debconf is something for use with Debian packages, not for
> user scripts.

Oh, I didn't mean that user scripts use the debconf mechanism for
configuration, but rather, honor/use debconf's frontend method:

,-----
| One of debconf's unique features is that the interface it presents
| to you is only one of many, that can be swapped in at will. There
| are many debconf frontends available.
| 
| The dialog is the default frontend.
| 
| The readline is the most traditional frontend, this looks quite
| similar to how Debian configuration always has been: a series of
| questions, printed out at the console using plain text, and
| prompts done using the readline library.
`-----

There are also modern X GUIs using the gtk or Qt libraries...

> Switching from dialog to debconf would break the OS compability, the
> scripts could not be used outside of Debian then. As I use some of
> my scripts on other platforms as well that's nothing I really want
> to do. Especially as it will become even harder for contributors to
> make patches against scripts, because they would have to learn about
> debconf first - whereas dialog is pretty straight forward.

Ok, it is more complicated than I thought. Ok then, it is your call.
Hope you use a wrapper for dialogs and implement a readline frontend
someday. BTW, using a wrapper for dialog will allow you to use xdialog or
other dialog compatible interfaces to provide a modern X GUI interface
instantly. 

thanks

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sf.net/techdocs/
  http://xpt.sf.net/tools/




More information about the Grml mailing list