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

Re: Deconf and shared questions

On Sat, 12 Jul 2003 12:40:06 -0500, Steve Langasek <vorlon@netexpress.net> said: 

> On Fri, Jul 11, 2003 at 01:20:12AM -0500, Manoj Srivastava wrote:
>> Given that the check is done before asking any question in the
>> postinst, if you do install all three of the packages, the first
>> one whose postinst runs shall ask the question, and create the
>> file; subsequently, the other packages won't ask the question,
>> since the file /etc/news/organization shall exist. So the user is
>> only asked once.

>> Now, if all these packages use debconf, and they all preconfigure,
>> then when the preconfiguration is run, the file does not exist --
>> and thus all the packages in question shall query the user --
>> bombarding the installer with multiple versions of the same
>> question, over and over again -- unless all the packages use the
>> same, shared, variable.

>> If there is to be a shared variable, what should the common shared
>> toplevel hierarchy be? I don't see all these packages (dist,
>> mailagent, Gnus, VM, and other packages) using a common (virtual)
>> package name; they are not even close to being similar types of
>> packages, and thus do not share a common purpose in general, only
>> for this variable.

>> The question then becomes: what is this shared variable called? How
>> does a package maintainer discover this variable? How are updates
>> to common templates made? Does some package "own" this shared
>> variable template? Which one?

>> Where is this central registry of shared variablenames, so that the
>> next package wanting to create /etc/news/organization can use the
>> same variable, and not ask the user yet another duplicate question.

> I don't think there is a central registry.  I do see a debconf value
> on my system named shared/organization; this seems to be a
> general-purpose "organization" value, but perhaps it could be used
> for the contents of /etc/news/organization as well?

	How does one discover these templates then? Is this a
 hit-or-miss effort based on the packages I may have installed on my
 machine? Seems to me that makes it very likely that the user shall be
 bombarded with identical questions on install then; I think this
 would be quite irksome.

> The "shared/" toplevel heirarchy seems to be popular for this sort
> of thing, at any rate; even related packages seem likely to use this
> when the question doesn't clearly belong to just one of them.

	OK. How do I discover the templates in the shared hierarchy,

> As for owning the template: /all/ of the packages own the template
> (as shown by the Owners: field in /var/cache/debconf/config.dat),
> and must ship it; or there must be a common package that all others
> depend on which owns the question, if including it in multiple

	Assuming one knows which package this is. Also, do all these
 templates have to be identical? If not, which template determines the
 question that is asked? 

> packages is seen as a duplication of effort.  In the absence of
> strict package dependencies, though, each package that needs the
> answer must be prepared to ask for it separately.

	This seems to be very conducive to having the user bombarded
 with identical questions, then, for shared values.

	I am not sure where I stand on the tradeoff between multiple,
 redundant questions being asked in the preconfigure phase, or a
 single question being asked in the postinst (since subsequent
 postinsts would not ask the question since /etc/news/organization
 would exist).  I tend to lean towards the single question.

Software Engineering: How to program if you cannot.  Dijkstra
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Reply to: