[config-package-dev] migration of diverted files from one package to another?

Patrick Schleizer adrelanos at riseup.net
Fri Mar 14 13:11:10 EDT 2014


Hi,

in my case, a few diverted files have been removed from one package and
added to a new package.

In the existing packages, the displaced files and the .displace have
been removed.

The problem seems, the prerm script will only do undisplace_unlink on
remove and deconfigure. Not on upgrade. Therefore the dpkg diversions
will not be removed and conflict with the new package.

Wouldn't it be better to always do undisplace_unlink in the prerm script
and to redo what is necessary in the postinst script? I think that would
handle the upgrade case better where displaced files are no longer
necessary.

Cheers,
Patrick

Lukas Anzinger:
> Hi,
> 
> while I haven't tried it, I think it would be sufficient to just move
> the *.displace file from the old source package to the new one.
> Additionally you will need a versioned conflict and replace, see also
> https://wiki.debian.org/Renaming_a_Package. The postrm script of the
> old package cleans up the symlink during upgrades before the new
> packages creates the new one. The conffiles are left alone by
> config-package-dev and handled solely by dpkg.
> 
> Regards,
> 
> Lukas
> 
> On Mon, Jan 27, 2014 at 5:44 PM, Patrick Schleizer <adrelanos at riseup.net> wrote:
>> Hi,
>>
>> let's say you have a few displaced files in package "a", which is
>> already installed. Now you plan to upgrade package "a" and to move the
>> displaced files to package "b". While package "a" depends on/or
>> recommends package "b".
>>
>> Are such cases supported or could any maintainer scripts have clashing
>> dpkg-diversions or issues like that?
>>
>> Cheers,
>> Patrick
>> _______________________________________________
>> config-package-dev mailing list
>> config-package-dev at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/config-package-dev
> 



More information about the config-package-dev mailing list