Building package with variable in makedepends fails with "Package '$variable': Could not find aport"
I'm trying to build phoc (to add a patch for https://gitlab.gnome.org/World/Phosh/phosh/-/issues/900) and am getting this error:
[20:53:10] ERROR: Package '$_wlrootsmakedepends': Could not find aport, and could not find this package in any APKINDEX!
[20:53:10] See also: <https://postmarketos.org/troubleshooting>
Run 'pmbootstrap log' for details.
The phoc 0.25.0-r0 APKBUILD
defines _wlrootsmakedepends
and then uses it in defining makedepends
, which pmbootstrap doesn't seem to understand:
_wlrootsmakedepends="
eudev-dev
# ...
xwayland-dev
"
makedepends="
glib-dev
# ...
wayland-protocols
$_wlrootsmakedepends
"
Workaround: Copy the content of _wlrootsmakedepends
into makedepends
. Not pretty, but works.
Defining makedepends
using variables doesn't seem to be very common, but a fix would still be nice.
pmbootstrap log
(044545) [20:53:10] ERROR: Package '$_wlrootsmakedepends': Could not find aport, and could not find this package in any APKINDEX!
(044545) [20:53:10] See also: <https://postmarketos.org/troubleshooting>
(044545) [20:53:10] Traceback (most recent call last):
File "/usr/share/pmbootstrap/pmb/__init__.py", line 49, in main
getattr(frontend, args.action)(args)
File "/usr/share/pmbootstrap/pmb/helpers/frontend.py", line 115, in build
if not pmb.build.package(args, package, arch_package, force,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pmbootstrap/pmb/build/_package.py", line 523, in package
if not init_buildenv(args, apkbuild, arch, strict, force, cross, suffix,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pmbootstrap/pmb/build/_package.py", line 207, in init_buildenv
depends, built = build_depends(args, apkbuild, depends_arch, strict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pmbootstrap/pmb/build/_package.py", line 155, in build_depends
if package(args, depend, arch, strict=strict):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pmbootstrap/pmb/build/_package.py", line 514, in package
apkbuild = get_apkbuild(args, pkgname, arch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pmbootstrap/pmb/build/_package.py", line 52, in get_apkbuild
raise RuntimeError("Package '" + pkgname + "': Could not find aport, and"
RuntimeError: Package '$_wlrootsmakedepends': Could not find aport, and could not find this package in any APKINDEX!