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

Re: Using debconf-set-selections in my package script

Neil Williams wrote:
> On Fri, 2008-08-29 at 15:37 +0800, Thomas Goirand wrote:
>> Hi,
>> My package depends pure-ftpd, but only when it's using the standalone
>> mode, which is annoying as this is NOT the default.
> There may be a good reason why this is not the default - have you talked
> to the pure-ftpd maintainer(s) ? Can your package be patched to use the
> default mode?

I'll try.

>>  Am I allowed to use
>> debconf-set-selections somewhere in my package script to set it
>> correctly? 
> No - one package is not allowed to modify the configuration of a
> different package.

That's what I thought as well, and this is why I asked.

> Your
> script must not offer to do this task itself. (You would be allowed to
> restart other services but even this needs to be done with caution - see
> the problems with dbus and network-manager restarts).

And that's my current problem. My package currently RESTARTS pure-ftpd
when the user launches a userland script that have the purpose of
configuring pure-ftpd-mysql. Now, what's the correct way to check if
pure-ftpd-mysql is using inetd or is in standalone mode? Should I depend
on debconf-utils and use debconf-get-selections, check if pure-ftpd has
been configured (exit with an error message if not), and restart the
daemon if needed?

> If the package is installed without the change in the other package - or
> if that change is reverted for some reason later on - the package must
> detect this and handle it cleanly.

Right, and that's my current concern.

> The package must operate (within limits) with the "wrong" option, at
> least to the point where a running process continues to run or a new
> process can provide useful feedback to the user and exit cleanly.

Then I do need to detect the current selected option, and I need to know
how to do it CLEANLY (I know how to hack it, just not sure what is
considered the clean way).

Thanks for your useful answers and your time,


Reply to: