apk3: provider priority is not respected
I created two packages, testpkg-a
and testpkg-b
. They both provide testfoo
with an identical version, with testpkg-a
having priority of 1 and testpkg-b
having priority of 100.
adbdump for testpkg-a
, showing it has the correct priority and provides:
#%SCHEMA: 676B6370
# ADB block, size: 292, compat: 0, ver: 0
info:
name: testpkg-a
version: 0.1-r0
unique-id: c1be6a801cc49e691a96f5f12117ac300f13d0eb
description: Test package
arch: x86_64
license: custom:meta
origin: testpkg-a
maintainer: q66 <q66@chimera-linux.org>
url: https://chimera-linux.org
build-time: 1679187819
installed-size: 4096 B
priority: 1
provides: # 1 items
- testfoo=0.1-r0
paths: # 1 items
- acl:
mode: 755
user: root
group: root
# sig v00 h04 8d10a60e37e6ce5ec1ccec8752206cb61e14f90b5e8dbe823c794e6bc078a93235cfca9df149f3792061b4d595cb60c259cfe8522d99..: UNTRUSTED signature
adbdump for testpkg-b
, showing the same:
#%SCHEMA: 676B6370
# ADB block, size: 304, compat: 0, ver: 0
info:
name: testpkg-b
version: 0.1-r0
unique-id: 8ce10ac4c5ef480b149024358d9908bce206e708
description: Test package
arch: x86_64
license: custom:meta
origin: testpkg-a
maintainer: q66 <q66@chimera-linux.org>
url: https://chimera-linux.org
build-time: 1679187819
installed-size: 4096 B
priority: 100
provides: # 1 items
- testfoo=0.1-r0
paths: # 1 items
- acl:
mode: 755
user: root
group: root
# sig v00 h04 8d10a60e37e6ce5ec1ccec8752206cb67ecd102f70341aee0ffba8f5162e0cc2c6b8e8255b98fcb58d45efcd9a3c18b75a50945b0825..: UNTRUSTED signature
since they have the same version, apk should use the priority as a tie-breaker, and install testpkg-b
when requesting a testfoo
. However, this is not the case:
$ apk add testfoo
(1/1) Installing testpkg-a (0.1-r0)