Commit 14faa25
committed
apk: avoid silent file overwrites between packages
Actually "apk" allow silent files overwrites between packages
sharing the "--info origin" field, that is for example, all packages
implementing VARIANTs which are precisely those with highest posible
file conflicts [1].
We are preventing this at the package level conflicts restrictions, but
in some cases like packages using ALTERNATIVES mechanism would not catch
those file conflicts as it allow to install packages whitin the same
VARIANT(same "origin") side-by-side. And more cases without VARIANTs
(ca-certs, v2ray-*, etc.)
This is a feature of the apk package manager to allow old packages be
replaced but since "apk" also offers the field "replaces" which allow
these overwrites explicitly [2].
Modify the "origin" field appending the package name in order to make
this field unique in all cases and get back the expected behavior since
"opkg" times.
[1]: apk docs https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/doc/apk-package.5.scd?#L127
[2]: apk docs replaces https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/doc/apk-package.5.scd?#L217
Fixes: openwrt#20802 (comment)
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>1 parent 5c5823a commit 14faa25
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| |||
0 commit comments