-
Notifications
You must be signed in to change notification settings - Fork 95
Description
PR #1187 introduced a warning when package groups are incompletely built; commit e5dced1 later promoted that warning to an error.
This breaks all packages that have no associated -debug package, including all “pure” Python packages (which include no native machine code).
Steps to reproduce:
-
Pick any Python package from the AUR that includes no native code, e.g.
python-inplace. -
Build that package and add it to your repo, e.g. using
aur sync. -
Run
aur buildagain on the same PKGBUILD:env -C ~/.cache/aurutils/sync/python-inplace aur build -d aur
Expected result
aur-build prints:
build: warning: skipping existing package (use -f to overwrite)
and exits normally with status 0.
Actual result
aur-build prints:
build: error: package group partially built
/var/aur/python-inplace-1.0.1-1-any.pkg.tar.zst
and errors out with an exit status code of 2.
Root cause analysis
The root cause of the problem seems to be aur-build incorrectly assuming that anytime makepkg identifies a potential -debug package to build, it is actually going to build it.
In reality, makepkg’s print_all_package_names function conservatively includes a potential -debug package but later takes the liberty of not actually building it if building it would be pointless.
aur-build evaluates the output of makepkg’s print_all_package_names (via aur build--pkglist), so aur-build’s test if (( ${#exists[@]} == ${#pkglist[@]} )); always fails for affected PKGBUILDs and ends up inside the error path.
Workaround
As a workaround, one can use aur build -f for all affected PKGBUILDs.
However, using -f has the drawback that you lose aur-build’s feature where it skips the build if the package already exists.
@AladW any ideas?