Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reinstalling conffiles

1 view
Skip to first unread message

Ben Collins

unread,
Dec 6, 2001, 2:17:11 PM12/6/01
to
On Thu, Dec 06, 2001 at 07:50:07PM +0100, Piotr Roszatycki wrote:
> On Thu, 6 Dec 2001, Ben Collins wrote:
> > > How to reinstall conffiles without purging and installing the package?
> > > I'm suprised that it seems it is impossible:
> >
> > dpkg --force-confmiss -i foo.deb
>
> Ah, sure :-) Thanks.
>
> On the other way: is it possible to force using the prompt for modified
> conffiles? Or maybe just to check which conffiles was modified? `dpkg -s
> package' only displays conffile with its MD5 sum.

dpkg --force-help

There are several --force-* options for conffiles, maybe one fits your
needs. To be honest, dpkg always prompts for modified conffiles, when
the new one is different than the original. It wont prompt when there is
no change in the original package. Might be a nice --force option to
always overwrite the conffiles with the one in the package. File a
wishlist bug.

Ben

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


--
To UNSUBSCRIBE, email to debian-dp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Ben Collins

unread,
Dec 6, 2001, 4:54:23 PM12/6/01
to
On Thu, Dec 06, 2001 at 09:04:10PM +0100, Piotr Roszatycki wrote:
> On Thu, 6 Dec 2001, Ben Collins wrote:
> > > conffiles? Or maybe just to check which conffiles was modified? `dpkg -s
> > > package' only displays conffile with its MD5 sum.
> >
> > dpkg --force-help
> >
> > There are several --force-* options for conffiles, maybe one fits your
> > needs. To be honest, dpkg always prompts for modified conffiles, when
> > the new one is different than the original. It wont prompt when there is
> > no change in the original package. Might be a nice --force option to
> > always overwrite the conffiles with the one in the package. File a
> > wishlist bug.
>
> But it didn't prompt when I changed conffile and then ran `apt-get
> --reinstall install package'. What is wrong?

Pay attention to what I said. It only prompts when the original conffile
of the package you have installed differs from the original that you are
about to install.

Ben Collins

unread,
Dec 7, 2001, 7:33:40 AM12/7/01
to
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.

0 new messages