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

Re: bug #561324: asking questions in postinst


On Tue, Dec 29, 2009 at 02:38:46PM +0100, Lionel Elie Mamane wrote:
> On Mon, Dec 28, 2009 at 07:44:56PM +0100, Reinier Haasjes wrote:
> >> Why? Is it really required to have _all_ questions in the postinst?
> > No, not all. There are 4 questions asked.
> > 1) brokers list, the list is received by the package-binary and the user
> > selects te broker he wants to use. For this I can use a dns-query (type
> > TXT) but dig and host are both not essential packages, so this still has
> > to go to the postinst.
> Well, this could be solved by a pre-depends on dnsutils |
> bind9-host. Pre-depends are often frowned upon, what do others think
> of this for this case?

I've discussed this issue here with Martin Zobel-Helas and
he and I agree that in this limited case it could be a good solution:

- It solves the problem in question (without a code duplication)
- A pre-depend loop is highely unlikely. After all we should slap
  anybody pre-depending on aiccu very hard.
- A Pre-Depend on utilities that are likely to be installed anyway
  seems like a not so great risk to avoid it.

> Another good solution would be to get the brokers list in the
> config/preinst (and ask which one to use) if bind or host are already
> there (the common case) and to get the list in the postinst if the
> information has not already been gotten.

Would work, would be robust, but basically it would mean to have
basically the very same code (except some conditionals) two times
in two different places. Not a big drawback, but still worth a notice.

Best Regards,

Reply to: