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

Transitional packages with conffiles



Hi,

after this problem came up on irc I thought I would mention it to a
larger audience:

After upgrading to squeeze the dhcp client suddenly started to overwrite
/etc/resolv.conf again while before it was configured not to do so.

Looking into the cause we discovered that the problem is that
dhcp3-client is now a transitional package that pulls in
isc-dhcp-client. The new package expects its config files in /etc/dhcp
while the old had /etc/dhcp3/. The changes made to the old config no
longer affect the new client.

Which brings me to the subject of this mail:


Transitional packages with conffiles.

Wouldn't it be nice to detect when local configuration changes are lost
due to package migration?

Obviously it would be nice if the migration would also migrate the old
config to the new package but that isn't allways possible. In those
cases I think it would be nice to give a warning to the administrator
that he has to transition the config changes manually.

What I think might work is for the transitional dummy package to check
for modified conffiles and local config files in postinst. If such files
exist then a debconf warning should be shown. Transitional packages
depend on the new package so its postinst script has already run and
should have converted the old config where possible. So anything left
should be things that couldn't be handled automatically. If a better
test can be made for a package then by all means it should. But I think
as a generic test this should work.

What do you think?

MfG
        Goswin


Reply to: