can't install apk name provided by another apk from local repo
I'm trying to build a subset of aports repo using buildrepo
command for my own project. I have my repo in /data/build/alpine-aports
and it's structure is almost the same as aports
repo, i.e. there's /data/build/alpine-aports/main
directory that contains one directory per package.
I built the entire repo running this command:
buildrepo -a /data/build/alpine-aports -d /data/build/alpine-aports/packages main
All the apks got built except for lldb which throws an error:
ERROR: unsatisfiable constraints:
ninja (virtual):
provided by: samurai
required by: .makedepends-lldb-20200730.114257[ninja]
>>> ERROR: lldb: builddeps failed
>>> lldb: Uninstalling dependencies...
ERROR: No such package: .makedepends-lldb
ERROR: lldb: Failed to build
After a little bit of digging I pinpointed the problem. When the apk is built, it first installs the make dependencies, which I can also do directly like this
cd main/lldb
APORTSDIR='/data/build/alpine-aports' REPODEST='/data/build/alpine-aports/packages' abuild deps
This fails as well with the same error. I dug even deeper and it fails when it's internally running this command:
abuild-apk add --wait 30 --repository '/data/build/alpine-aports/packages/main' --virtual .makedepends-lldb --quiet --simulate build-base clang-dev>=10 clang-static>=10 cmake doxygen libedit-dev libffi-dev libxml2-dev linux-headers llvm-dev>=10 llvm-static>=10 ncurses-dev ninja python3-dev swig
To make it simpler, since ninja is the problem, I just ran these 2 commands and I got the same error again from both of them:
apk add --repository '/data/build/alpine-aports/packages/main' --virtual tmptest ninja
apk add --repository '/data/build/alpine-aports/packages/main' ninja
So I can't install ninja from my local repo. Ninja doesn't exist but instead it's provided by samurai which replaced it a while ago. If I try to install it from official Alpine remote repo, it works:
apk add ninja
(1/1) Installing samurai (1.1-r0)
Executing busybox-1.31.1-r19.trigger
OK: 341 MiB in 74 packages
Also, if I try to install samurai directly from my local repo, it also works:
apk add --repository '/data/build/alpine-aports/packages/main' samurai
(1/1) Installing samurai (1.1-r0)
Executing busybox-1.31.1-r19.trigger
OK: 341 MiB in 74 packages
So I can install samurai from my local repo, which proves that my local repo isn't broken or something but I can't install ninja. But I can install ninja from remote repo. Very strange.