AUR GitHub Mirror Not removing removed packages
My apologies if this is the wrong project/repo to file this bug under, but it seemed the most relevant.
This issue also, presumably, would be resolved by #539 as it would contain a canonical list of "real" AUR packages/package bases that could be used in lieu of walking branches.
Currently, the AUR GitHub mirror contains branches for, seemingly, all package bases in the AUR - past and present. This means that packages that were deleted (e.g. taken at random from a diff, the centrifuge-bin package) are present in the GitHub mirror.
e.g.:
- https://github.com/archlinux/aur/tree/centrifuge-bin (exists)
-
https://aur.archlinux.org/packages/centrifuge-bin (
404)
I'm unaware how the mirroring is done to GitHub or how a package is "deleted" from the git at aur.archlinux.org, but I suspect if it's purely through git mechanisms then pruning is not being done, leading to 47103 (at time of writing) "obsolete" branches in the GitHub mirror:
$ git ls-remote https://github.com/archlinux/aur 'refs/heads/*' | grep -Ev '\s+refs/heads/main$' | wc -l
142222
$ curl -sL https://aur.archlinux.org/pkgbase.gz | zcat | wc -l
95119
If this is by intent (e.g. old packages' branches are intentionally kept, which if I recall they are on the "true" AUR git), perhaps it would be ideal to mark a branch/pkgbase as "deleted" without actually deleting the branch itself. e.g. by giving it a branch name that is incompatible with a pkgbase name (e.g. -deleted.<pkgbase>, as neither pkgbase names or package names may start with a hyphen but branch names on GitHub may start with a hyphen).