Sample Header Ad - 728x90

How does apk's replaces work when the package being replaced gets upgraded?

1 vote
0 answers
134 views
Say I have a package A, and package B. Package B contains some files which deliberately conflict with package A, and it is desirable for package B's files to be favoured over the ones in package A if a user installs both. The easy solution to this with apk-tools is to have package B include replaces=A in its APKBUILD so that the resulting package contains this metadata. Given this, if package A is installed and then B, B's conflicting files should take precedent. However, what happens if package A then gets upgraded and B doesn't? Do the conflicting files from A take precedent, or does apk keep the ones from B?
Asked by Newbyte (1380 rep)
Oct 3, 2023, 11:11 AM