On 19/11/2022 21.58, Thomas Lange wrote:
On Sat, 19 Nov 2022 13:29:52 +0100, Andreas Beckmann <a...@debian.org> said:

     >> From the attached log (scroll to the bottom...):

     >   Preparing to unpack .../dracut-core_057+157-2_amd64.deb ...
     >   Unpacking dracut-core (057+157-2) over (056-3) ...
     >   dpkg: error processing archive 
/var/cache/apt/archives/dracut-core_057+157-2_amd64.deb (--unpack):
     >    trying to overwrite 
'/usr/lib/dracut/modules.d/95virtfs/module-setup.sh', which is also in package 
dracut-network 056-3
     >   dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
     >   Errors were encountered while processing:
     >    /var/cache/apt/archives/dracut-core_057+157-2_amd64.deb

I can understand the problem (and the fix to add the breaks relation),
but I wonder why I should define a replaces to dracut-network?
dracut-core does not replace dracut-network. It only breaks
dracut-network (<< 057+157-2). Can you please tell me what correct way
is to fix it.

Some files moved from -network to -core (the files that were in both packages in yesterdays bug). In order to properly handle that on upgrades, you need both versioned Breaks and Replaces. The Replaces s.t. dpkg will move file ownership if -core gets unpacked first, the Breaks to prevent partial upgrades (and subsequent partial removals or downgrades, that's where the fun usually starts) of the packages involved in the file move.

Andreas

Reply via email to