[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Renaming packages: maintscripts

Hi Michael

On Sun, Sep 02, 2012 at 02:18:56PM +0400, Michael Tokarev wrote:
> It's been not once when I hit an issue described below.
> Now I hit it in one of the packages I maintain, but so
> far I can't figure out a good solution for it.
> The issue is with package renaming and handling of dpkg
> maintscripts.
> Having in mind typical renaming scenario: package A has
> been renamed to B, and transitional package A' has been
> created - dummy which merely depends on B, so that upgrades
> work fine.  B breaks A before the transitional version,
> so dependencies ensures that A and B aren't installed
> at the same time.
> Everything works fine indeed till someone tries to install
> B on a system where A is installed, without upgrading A
> to A'.  Apt solves the Breaks by removing A, but not purging
> it.  So we're left with dpkg maintscripts from A.
> And quite often, on purge, maintscripts removes config files
> (especially ucf-managed) and performs other cleanup.  But all
> that should not be done, since it will now break B!
> Basically I want to ensure that if one installs package B to
> a system with A installed, A should be upgraded to A' at the
> same time.  This works when upgrading A to A' (satisfying A'
> dependency and installing B), but does not work when installing
> B alone when A is installed.
> Only this way it is possible to work around old maintscripts
> in the renamed package.
> But I don't see a way to satisfy this.  Something I didn't think
> of ?

I see in the paragraph above you talk about Breaks. Do you also have
an according Replaces in place? See [1] and [2].

 [1]: http://wiki.debian.org/Renaming_a_Package
 [2]: http://www.debian.org/doc/debian-policy/ch-relationships.html#s7.6.1

Does this helps?


Attachment: signature.asc
Description: Digital signature

Reply to: