On 2012-05-21 13:55, Santiago Vila wrote:
> I would say that's not exact. dpkg does not detect a conffile as being
> modified, dpkg detects the file as being different from the *default*,
> which is probably correct.

Now we have to tell dpkg that some old file *is* the unchanged old
default ...

> In squeeze, /etc/profile was created by postinst from a default file
> in /usr/share/base-files.
> 
> In base-files 6.5, the default changed.

> Finally, in base-files 6.8, the file is now a conffile.

:-)

> How is this supposed to be handled? The URLs you give explain how to
> remove a conffile or how to rename it, but not how to make a conffile
> when it was not a conffile.

I'm sure this has been done before, but I don't have a good reference.
IIRC sudo did such a transition for /etc/sudoers, but they currently
don't support seamless upgrades with sudoers files from before squeeze.

I'd probably
* collect md5sums of all previous versions of the "defaults" (going back
to lenny, eventually even earlier as this is an essential package and we
don't want to annoy people with long grown systems ... don't forget
point releases (or even historic versions in sid/testing) that might
have changed the defaults
* in preinst if we are upgrading from an old version (aka << 6.9) check
the existing /etc/profile against this list and if we have a match (so
we can install the new version without prompting) either tell dpkg that
the existing file "is fine" to upgrade from (no idea how this could
work) or move the file aside (could this break something?), e.g. to
.dpkg-old and clean up in postinst (or move back in failed-upgrade).

Anyway, recommended practice for "config file" to "conffile" transitions
should be documented (and I'd happily add a pointer to the piuparts bug
template).

Eventually someone on debian-devel@ might have some more ideas?

Andreas



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to