[Bug]: build-all.sh is broken due to build order computation
Problem description
build-all.sh fails on what I believe is a clean and up to date container because buildorder.py detects cycles. I added a little code to print out what they actually are in #20337 and it appears to be mostly (but not entirely) packages are that not dependencies of anything, but which have subpackages. For example, vim, which has the subpackage vim-runtime.
It looks like what's happening is that, in non-fast-build mode, subpackages are added to the map of package names to TermuxPackage objects as aliases for their superpackages. vim-runtime ends up an alias to the TermuxPackage for vim, so vim-runtime is not treated as a leaf, but that means that vim never gets added to the queue, because the block that decides when to add reverse dependences to the queue will never actually see that all of vim's deps, which include vim-runtime, will never be empty.
What steps will reproduce the bug?
scripts/run-docker.sh ./build-all.sh
What is the expected behavior?
All packages are built.
System information
n/a