~alpine/users

1

How to address apk file conflicts?

Winston Weinert <winston@ml1.net>
Details
Message ID
<20200804043531.ltdodl7vps2cywns@ml1.net>
DKIM signature
missing
Download raw message
Sometimes I encounter an alpine box with apk errors:

/ # apk add nethack
(1/1) Installing nethack (3.6.6-r0)
Executing busybox-1.31.1-r16.trigger
1 error; 28 MiB in 23 packages

My usual approach to fixing these issues is to run "apk
fix". Sometimes it fixes it, other times it isn't fixable due to a
file conflict:

/ # apk fix
(1/1) Reinstalling perl-doc (5.30.3-r0)
ERROR: perl-doc-5.30.3-r0: trying to overwrite usr/share/man/man3/Data::Dumper.3pm.gz owned by perl-data-dumper-doc-2.173-r3.
1 error; 23 MiB in 19 packages

In a situation such as the above, my solution is to delete one of the
affected packages, and report the conflict to
https://gitlab.alpinelinux.org/alpine/aports/-/issues

Is there a better recourse than deleting one of the conflicting
packages? Is there a mechanism in apk to manually resolve file
conflicts?

Unfortunately things like "abuild -r" and ansible's apk module will
fail when apk fails even if the overall operation was a success.

Happy apk-ing,
Winston Weinert
winny.tech
Details
Message ID
<2c3496cd-ce61-c912-cb16-7399dda05c15@dereferenced.org>
In-Reply-To
<20200804043531.ltdodl7vps2cywns@ml1.net> (view parent)
DKIM signature
missing
Download raw message
Hello,

On 2020-08-03 22:35, Winston Weinert wrote:
> Sometimes I encounter an alpine box with apk errors:
> 
> / # apk add nethack
> (1/1) Installing nethack (3.6.6-r0)
> Executing busybox-1.31.1-r16.trigger
> 1 error; 28 MiB in 23 packages
> 
> My usual approach to fixing these issues is to run "apk
> fix". Sometimes it fixes it, other times it isn't fixable due to a
> file conflict:
> 
> / # apk fix
> (1/1) Reinstalling perl-doc (5.30.3-r0)
> ERROR: perl-doc-5.30.3-r0: trying to overwrite usr/share/man/man3/Data::Dumper.3pm.gz owned by perl-data-dumper-doc-2.173-r3.
> 1 error; 23 MiB in 19 packages
> 
> In a situation such as the above, my solution is to delete one of the
> affected packages, and report the conflict to
> https://gitlab.alpinelinux.org/alpine/aports/-/issues

This is the correct thing to do.  Especially with perl, it is easy to 
wind up in a situation where perl itself now ships a module that used to 
be out-of-tree.

> Is there a better recourse than deleting one of the conflicting
> packages? Is there a mechanism in apk to manually resolve file
> conflicts?

Unfortunately not, but if you open an issue against apk-tools, it is 
something we could investigate implementing in apk-tools 3.

> Unfortunately things like "abuild -r" and ansible's apk module will
> fail when apk fails even if the overall operation was a success.
> 
> Happy apk-ing,
> Winston Weinert
> winny.tech
Ariadne
Reply to thread Export thread (mbox)