Raphael Hertzog wrote:
> > * If doing as the man page suggests and avoiding a pre-depends
> >   by testing dpkg-maintscript-helper supports.
> >   Here you'd presumably still want to let the action happen
> >   in a later upgrade if the old conffile is still present.
> >   (At least when removing an old conffile.. doing that when
> >   renaming a conffile is probably unsafe.)
> 
> What exactly do you fear when renaming a conffile?

The scenario I envision is a package upgrade that moves a conffile, but
also changes it. Suppose the new version is needed to avoid breakage.

There is no pre-depends on dpkg. The preinst does not run
dpkg-maintscript-helper, because a new enough dpkg is not installed yet.
Then dpkg is upgraded, and then the postinst runs (a low proability, but
possible scenario w/o a pre-depends).

So the postinst will run dpkg-maintscript-helper without prepare_mv_conffile
having had a chance to check the old conffile md5sum and move unmodified ones
out of the way.

So finish_mv_conffile will move the old, unmodified conffile into the
new location. The new conffile will be left as .dpkg-new. Does the user
see a modified conffile prompt at this point? I haven't checked.

Real culprit here is the avoiding of the pre-depends which allows the
postinst to run it despite the preinst not. The version check may
make the scenario less likely to occur.

> > * In debhelper, which needs to move conffiles sometimes, and doesn't
> >   have package version information available.
> 
> I hope you will provide a way for the maintainer to supply the required
> version.

This is difficult to do in both cases where debhelper has needed to move
conffiles before.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to