Skip to content
Snippets Groups Projects

pkg: move same origin check after replaces check

Open Sertonix requested to merge sertonix/apk-tools:replace-rigin into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
Please register or sign in to reply
Loading