conflict removed and added in the same transaction fails
Still not 100% sure what the issue is but here is how to reproduce it:
Build and install this package (apk add test
)
pkgname=test
pkgver=1
pkgrel=0
pkgdesc="test"
url="https://example.com"
arch="noarch"
license="MIT"
depends="got !got-doc"
options="!check"
package() {
mkdir -p "$pkgdir"
}
Build this package and then upgrade (apk upgrade
)
pkgname=test2
pkgver=2
pkgrel=0
pkgdesc="test"
url="https://example.com"
arch="noarch"
license="MIT"
provides="test=$pkgver-r$pkgrel"
depends="got !got-doc"
options="!check"
package() {
mkdir -p "$pkgdir"
}
This results in this output:
~$ doas apk upgrade
ERROR: unable to select packages:
got-doc-0.97-r0:
breaks: test2-2-r0[!got-doc]
I use the provides of test2
to remove test
in the same transaction test2
is added. There are probably other ways to do this.
Maybe apk tries to install got-doc
cause the conflict from test
has been removed without checking if a new package has a conflict too.
If the removal of test and the addition of test2 is done in 2 transactions it works without error:
~$ doas apk del test
(1/2) Purging test (1-r0)
(2/2) Purging got (0.97-r0)
Executing busybox-1.36.1-r24.trigger
OK: 4863 MiB in 1374 packages
~$ doas apk add test
(1/2) Installing got (0.97-r0)
(2/2) Installing test2 (2-r0)
Executing busybox-1.36.1-r24.trigger
OK: 4866 MiB in 1376 packages