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

Re: reinstalling conffiles



On Fri, Dec 07, 2001 at 09:32:19AM +0100, Piotr Roszatycki wrote:
> On Thu, 6 Dec 2001, Ben Collins wrote:
> > > So dpkg can't restore or even check which conffiles was modified.
> > > It might be helpful feature.
> >
> > It can, it just doesn't report it to the user unless the package
> > conffile changes (since that's the only time it really matters).
> 
> I don't understand why dpkg didn't prompt me for conffile which was
> changed. It was my previous example. Where is the problem? Does it work
> only for upgrade?

If you install libldap2 2.0.14-1, the conffile /etc/ldap/ldap.conf file
may have an original MD5Sum of:

ecdfdebc694773737317333af149f555

You edit /etc/ldap/ldap.conf, and reinstall the same version. Dpkg
checks the _original_ MD5Sum of /etc/ldap/ldap.conf against that of the
one it is about to install and notices they are the same. So why tell
the admin about it? Nothing changed in the original's, so it doesn't
affect the currently modified version.

Now, you then install libldap2 2.0.18-1, and it has a new
/etc/ldap/ldap.conf which added a new option. Dpkg notices the
_original_ MD5Sum is different from this new one, so it prompts the
admin, since he/she would probably want to know that something in the
defaults has changed.

If dpkg prompted for every modified conffile, regardless of changes,
then your upgrades would be very very time consuming, and you would get
very agitated at dpkg.

> > It should be possible write a script that does this.
> 
> I.e. there is no need to backup the conffiles which could be restored from
> distribution.

Write a script. It can't take more than 20-30 lines. Or submit a patch
against dpkg.

-- 
 .----------=======-=-======-=========-----------=====------------=-=-----.
/                   Ben Collins    --    Debian GNU/Linux                  \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'



Reply to: