Your message dated Fri, 11 Oct 2024 18:16:01 +0200
with message-id <[email protected]>
and subject line Re: Bug#1084948: dpkg not respecting Breaks+Replaces 
relationship
has caused the Debian Bug report #1084948,
regarding dpkg not respecting Breaks+Replaces relationship
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1084948: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084948
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpkg
Version: 1.22.11
Severity: normal

Dear maintainers,

It seems like dpkg does not allow for overwriting files when using the 
combination of package Replaces and Breaks that's described in Policy chapter 
7.6.1

https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces

If I read the Policy correctly, if you split off package A 1.0 into package A 
2.0 and B 2.0, where B 2.0 contains some files that was previously in A 1.0, 
you can then declare the relationships in a way that you can install B 2.0 on 
top of A 1.0 and have dpkg replace the overlapping files and make B 2.0 the 
owner of them.

However, in my testing this does not happen. Rather, dpkg will throw an error 
as such.

==========
$ apt install netatalk
$ dpkg -i netatalk-tools_4.0.0~ds-4_arm64.deb

dpkg: regarding .../netatalk-tools_4.0.0~ds-4_arm64.deb containing 
netatalk-tools:
 netatalk-tools breaks netatalk (<< 4.0.0~ds-1)
  netatalk (version 3.2.10~ds-1) is present and installed.

dpkg: error processing archive ../netatalk-tools_4.0.0~ds-4_arm64.deb 
(--install):
 installing netatalk-tools would break netatalk, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 ../netatalk-tools_4.0.0~ds-4_arm64.deb
==========

This commit represents the particular test case that I was using:

https://salsa.debian.org/netatalk-team/netatalk/-/commit/50d0f4b5522a366ce186d567dfa516b71c09d600

Am I missing something obvious here, or is there a discrepancy between what the 
Policy says and how dpkg behaves presently?

Your insights would be hugely appreciated!

Sincerely,

Daniel

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
On Fri, Oct 11, 2024 at 03:45:40PM +0000, Daniel Markstedt wrote:
> However, in my testing this does not happen. Rather, dpkg will throw an error 
> as such.
> 
> ==========
> $ apt install netatalk
> $ dpkg -i netatalk-tools_4.0.0~ds-4_arm64.deb
> 
> dpkg: regarding .../netatalk-tools_4.0.0~ds-4_arm64.deb containing 
> netatalk-tools:
>  netatalk-tools breaks netatalk (<< 4.0.0~ds-1)
>   netatalk (version 3.2.10~ds-1) is present and installed.
> 
> dpkg: error processing archive ../netatalk-tools_4.0.0~ds-4_arm64.deb 
> (--install):
>  installing netatalk-tools would break netatalk, and
>  deconfiguration is not permitted (--auto-deconfigure might help)
> Errors were encountered while processing:
>  ../netatalk-tools_4.0.0~ds-4_arm64.deb
> ==========

You are asking dpkg to install netatalk-tools which declares Breaks
against the installed netatalk without allowing it to deconfigure
netatalk. As a result, dpkg errors out. If you really want to allow dpkg
to proceed, you should either remove or upgrade netatalk before
unpacking netatalk-tools or you should allow dpkg to deconfigure the
installed netatalk by passing --auto-deconfigure.

I think this resolves your question and am thus closing the bug. If it
does not, please reopen.

Helmut

--- End Message ---

Reply via email to