[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

User interaction in postinst



In the package cupsys-driver-gimpprint, there are currently 148 PPD
(PostScript Printer Definition) files, about 1.5 MiB in total.
However, the average user will only ever need about one or two of
these (one for each model of printer), so the rest are unused.  In
addition, the PPD files can be localised (translated) to languages
other than US English, but we can't do that at the moment due to each
new language taking up 1.5 MiB.

There is a program called genppd to create the PPD files, and so
rather than create the PPDs at package build time, they could be built
after the package is installed.  I would like to ask the user what
language(s) they want, and what printer models they want, then just
generate the necessary files.

>From what I have read about debconf, the questions it asks are static.
However, in this case, I can't generate the questions until the
package is installed: the translations are gettext .mo files in the
gimpprint-locales package (which may be not installed or incomplete),
and the list of printer drivers is extracted from libgimpprint.so.1 by
genppd at run-time (and the list of printers changes as new ones are
added).

Is using debconf possible in this case?  Preconfiguring will fail, as
I can't get the data to list at that point.  The "multiselect" widget
type is just what I'm looking for, though.

If I can't use debconf, what is the best method for user interaction?


Many thanks,
Roger Leigh

-- 
Roger Leigh
                ** Registration Number: 151826, http://counter.li.org **
                Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848 available on public keyservers



Reply to: