Skip to content

[BUG] 404 on /pkgbase/:pkgname directs users to the “pkgbase” package

Checklist

NOTE: This bug template is meant to provide bug issues for code existing in the aurweb repository.

  • I confirm that this is an issue with aurweb's code and not a user-uploaded package.
  • I have described the bug in complete detail in the Description section.
  • I have specified steps in the Reproduction section.
  • I have included the versions which are affected in the Version(s) section.

Description

When you visit a pkgbase page for a package and get a 404 (either because it never existed, because it was since deleted from AUR, or because you’re trying to access the .git repository) the list of bullet points will instruct you how to git clone the “pkgbase” project rather than the package actually looked up (e.g., “thiswashopefullyneveractuallyarealpackage”, “tenacity”, or “java-openjfx” in my example links) and will also ask you to click “here” to return to https://aur.archlinux.org/pkgbase/pkgbase – which will just give the same message again.

The two first bullet points are still useful in the case of a package that used to exist, since the git repository is still available, but the third one seems to only ever be useful for someone trying to visit the 3rd case, where the package of package.git is still in the AUR.

Screenshot of https://aur.archlinux.org/pkgbase/tenacity showing the above description

Code speculation

/templates/errors/404.html#L7 checks whether the 404 is pkgbase but there doesn’t seem to be any checking of whether pkgbase.Name makes sense. I think this is because of the PackageBase model not getting populated in packages.util.get_pkg_or_base() (via the "/pkgbase/{name}" route), but I’m not sure I’m parsing the code correctly.

Reproduction

Visit the /pkgbase/ page of

Version(s)

aurweb v6.2.9

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information