Issue with our ui-sxmo rework tentative
Yersterday we merged a refactorisation of our -ui-sxmo package. The recipe was more complex that the one we had before and can be found here : https://gitlab.com/postmarketOS/pmaports/-/blob/69533cc728633e9023dbc56f0cff29d3939796df/main/postmarketos-ui-sxmo/APKBUILD
The main idea is for the core -ui-sxmo to require a virtual package -ui-sxmo-de provided by the two -ui-sxmo-sway and -ui-sxmo-dwm (the sway one take priority so apk will use it by default if not specified as world)
Firstly this recipe was not working cause the CI was failing to build the both -ui-sxmo-sway and -ui-sxmo-dwm subpackages, required by the -ui-sxmo core one.
I tricked the CI for it to works using two merge requests. The last one added the dependency to the -ui-de virtual package in the core one. As it already builded those two subpackage with the first merge request, it worked.
The major issue came later from the bpo itself. The build job was stucked in "queued job" cause "postmarketos-ui-sxmo depends on postmarketos-ui-sxmo".
I would like to debug this case to see if:
- Our recipe was good and theorically possible and reliable
- We can fix the build process and come back to that recipe
I just made some tries and here what I found:
# temp/foo/APKBUILD WORKING
pkgname=foo
pkgver=1.0.0
pkgrel=0
pkgdesc="A foo program"
url="http://sr.ht/~bar/foo"
arch="x86_64"
license="MIT"
depends="
foo-bar
"
subpackages="$pkgname-bar"
package() {
mkdir -p "$pkgdir"
}
bar() {
depends="
foo
"
mkdir -p "$subpkgdir"
}
This recipe generate this dependency json:
{
"pkgname": "foo",
"repo": "temp",
"version": "1.0.0-r0",
"depends": []
},
# temp/foo/APKBUILD ISSUES
pkgname=foo
pkgver=1.0.0
pkgrel=0
pkgdesc="A foo program"
url="http://sr.ht/~bar/foo"
arch="x86_64"
license="MIT"
depends="
foo-bar
"
subpackages="$pkgname-bar1"
package() {
mkdir -p "$pkgdir"
}
bar1() {
depends="
foo
"
provides="foo-bar"
provider_priority="1"
mkdir -p "$subpkgdir"
}
This recipe generate this dependency json:
{
"pkgname": "foo",
"repo": "temp",
"version": "1.0.0-r0",
"depends": [
"foo"
]
},
I'm still learning how the postmarketOs building process works, so I may be wrong. But here I got the feeling that the dependency tree fail to understand somehow that the both cases should have a similar dependency list.
Is it the cause of our issue ?
PS: bonus point if we can make this recipe to works on the first try without needing two merge requests