pkg: move same origin check after replaces check
Otherwise replaces and replaces_priority doesn't work when packages have the same origin.
Fixes aports#16924
Small reproducer:
$ mkdir pkg
$ echo foo > pkg/file
$ apk mkpkg -F pkg -I name:foo -I origin:same -I version:1
$ echo bar > pkg/file
$ apk mkpkg -F pkg -I name:bar -I origin:same -I version:1 -I replaces:foo
$ apk add -p root --initdb --usermode
$ apk add -p root bar-1.apk --force-non-repository --allow-untrusted
$ cat root/file
bar
$ apk add -p root foo-1.apk --force-non-repository --allow-untrusted
$ cat root/file
foo
The last cat
should result in bar
since the bar
package replaces the foo
package.
Merge request reports
Activity
Please register or sign in to reply