[Pkg-netatalk-devel] Bug#1084819: Bug#1084819: netatalk-tools has an undeclared file conflict
Daniel Markstedt
daniel at mindani.net
Sat Oct 12 06:26:50 BST 2024
On Friday, October 11th, 2024 at 6:30 AM, Daniel Markstedt <daniel at mindani.net> wrote:
>
>
> As an additional remark, the Policy text suggests that the combination of Breaks and Replaces directives should allow dpkg to overwrite the overlapping files and transfer ownership of said files to the new package.
>
> This section:
>
> > It is usually an error for a package to contain files which are on the system in another package. However, if the overwriting package declares that it `Replaces` the one containing the file being overwritten, then `dpkg` will replace the file from the old package with that from the new. The file will no longer be listed as “owned” by the old package and will be taken over by the new package. Normally, `Breaks` should be used in conjunction with `Replaces`.
>
>
> https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces
>
> However, as demonstrated above, I could not observe this behavior in practice. Rather, dpkg will disallow both installation and unpacking of the new overlapping package.
>
> This is with an up-to-date Debian Testing system.
>
> Daniel
Following the response/clarification in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1084948 I could confirm that both unpacking and installing on top of the old netatalk package works correctly as long as you pass all of the required packages to dpkg in one go, e.g. with:
$ dpkg install netatalk
$ dpkg --unpack netatalk_4.0.0~ds-4_arm64.deb libatalk_4.0.0~ds-4_arm64.deb netatalk-tools_4.0.0~ds-4_arm64.deb
(Reading database ... 60367 files and directories currently installed.)
Preparing to unpack .../netatalk_4.0.0~ds-4_arm64.deb ...
Unpacking netatalk (4.0.0~ds-4) over (3.2.10~ds-1) ...
Selecting previously unselected package libatalk:arm64.
Preparing to unpack .../libatalk_4.0.0~ds-4_arm64.deb ...
Unpacking libatalk:arm64 (4.0.0~ds-4) ...
Selecting previously unselected package netatalk-tools.
Preparing to unpack .../netatalk-tools_4.0.0~ds-4_arm64.deb ...
Unpacking netatalk-tools (4.0.0~ds-4) ...
Processing triggers for libc-bin (2.40-3) ...
Processing triggers for dbus (1.14.10-4+b1) ...
Processing triggers for man-db (2.13.0-1) ...
To return to the original matter:
Even without `Replaces' the netatalk-tools package takes ownership of the handful of files that it inherits from old netatalk.
And by "takes ownership" I mean that removing the new netatalk package does not remove those files, while removing netatalk-tools *does* remove those files. (Is there another aspect of "ownership"?)
Is *this* potentially a bug in dpkg then, by any chance? If I read Policy correctly, it ought to disallow transferring ownership of files from package A 1.0 to package B 2.0 unless `Replaces' is declared. But in reality it does allow the transfer of ownership with only the `Breaks' relationship declared.
Thanks!
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 855 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-netatalk-devel/attachments/20241012/7a92ce98/attachment.sig>
More information about the pkg-netatalk-devel
mailing list