Ian Jackson writes ("dpkg vanishing conffiles - more complex/complete
specification"):
> * During conffile processing, [...]
How does dpkg know whether the conffile is has been removed from the
package and its conffiles because it's obsolete (in which case the
user should be asked whether to remove it) and it's been removed
because it's changing from a conffile to a maintainer-script handled
config file ?
I don't think dpkg has any way to tell at the moment. The package
maintainer would have to say. And, for existing packages, something
approaching the current behaviour is sensible to avoid breaking stuff.
So, I'll rename "disappearing" to "obsolete" and not do any
configure-stage processing at all. But we'll leave the file as part
of the package's files list and conffiles list, which will at least
make purge work properly and allow any new package which takes over
the file to get the full conffile record.
New scheme:
* During unpack, when an existing conffile is not present in the new
archive, it remains owned by the package and listed in its .list
file and Conffiles field even though the new version of the package
doesn't contain the file.
* However, we introduce a new syntax in the Conffiles status file
field: optionally, after the md5sum, we add the annotation
`obsolete'. This annotation is there exactly in the case where the
conffile is only listed as part of the package because it was in a
_previous_ version of the package.
* During the end of unpack processing, while the old files (ones on
the old but not the new package) are being removed from the file
list, if the old file was a conffile, we retain its entry in the
status file's Conffiles field, with the old original hash, and we
retain its entry in the file list. We add the `obsolete'
annotation to the Conffiles entry.
* During conffile processing, the disappeared conffile will never
have a .dpkg-new so we will simply skip it.
* When we take over a Conffile entry from one package to another,
during unpack, we clear the disappearing flag.
* Purge will automatically pick up the new entry and purge the old
file.
Ian.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]