Hi,

On Fri, 13 Jul 2012, Josh Triplett wrote:
> On Fri, Jul 13, 2012 at 05:26:28PM +0200, Raphael Hertzog wrote:
> > Michael Biebl reported in the thread at
> > http://lists.debian.org/[email protected]
> > that the difficulty was to handle the case where the target
> > package has no guaranty to be installed. In that case, we
> > might keep the old conffile around when we don't really
> > want.
> > 
> > In http://lists.debian.org/[email protected]
> > I suggested to create a rm_conffile_if_owner helper
> > function to deal with this case.
> > 
> > Would this fit your needs too?
> 
> I *think* that would work.  I don't need support for moving conffiles
> between arbitrary packages, just support for allowing package2 to take
> over a conffile from package1, and allowing package1 to drop the
> conffile if not installing package2.  How would rm_conffile_if_owner
> behave with a modified conffile?

Just like rm_conffile. It would keep a ".dpkg-bak" copy of the file.

> Would it keep the conffile around in a way that allows the new package
> to take it over with the old contents still intact?

Hum, not sure. At least I was not intending it that way. I was rather
imagining that the dependencies would force the upgrade of the target
package at the same time. That is package1 would break the versions of
package2 that don't have the conffile.

That way, in package1's postinst we can be sure that:
- either package2 has taken the file over
- or package2 is not installed

> And, would this also ensure that the conffile (even if modified) gets
> removed when purging package1, if not yet taken over by package2?

Yes, that should be part of the contract of rm_conffile_if_owner. But
it will only have to deal with this in the case of a modified conffile
(since the non-modified conffile would be pruned before-hand in the
postinst).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to