replace_aports_packages_with_path: better error (!1837)
Because of an APKINDEX subpkg parsing bug, pmbootstrap currently assumes that "ktp-common-internals" provides "make". It fails with a cryptic error when trying to build a package without an existing postmarketOS binary packages mirror (like done in the build.postmarketos.org testsuite): File "/home/user/code/pmbootstrap/pmb/chroot/apk.py", line 174, in replace_aports_packages_with_path package + "-" + data_repo["version"] + ".apk") TypeError: 'NoneType' object is not subscriptable Replace this error with a more meaningful message, that points to the issue analyzing this bug. Related: https://gitlab.com/postmarketOS/build.postmarketos.org/issues/61
This commit is contained in:
parent
84abedd536
commit
3587812539
|
@ -170,6 +170,14 @@ def replace_aports_packages_with_path(args, packages, suffix, arch):
|
||||||
aport = pmb.helpers.pmaports.find(args, package, False)
|
aport = pmb.helpers.pmaports.find(args, package, False)
|
||||||
if aport:
|
if aport:
|
||||||
data_repo = pmb.parse.apkindex.package(args, package, arch, False)
|
data_repo = pmb.parse.apkindex.package(args, package, arch, False)
|
||||||
|
if not data_repo:
|
||||||
|
raise RuntimeError(package + ": could not find binary"
|
||||||
|
" package, although it should exist for"
|
||||||
|
" sure at this point in the code."
|
||||||
|
" Probably an APKBUILD subpackage parsing"
|
||||||
|
" bug. Related: https://gitlab.com/"
|
||||||
|
"postmarketOS/build.postmarketos.org/"
|
||||||
|
"issues/61")
|
||||||
apk_path = ("/mnt/pmbootstrap-packages/" + arch + "/" +
|
apk_path = ("/mnt/pmbootstrap-packages/" + arch + "/" +
|
||||||
package + "-" + data_repo["version"] + ".apk")
|
package + "-" + data_repo["version"] + ".apk")
|
||||||
if os.path.exists(args.work + "/chroot_" + suffix + apk_path):
|
if os.path.exists(args.work + "/chroot_" + suffix + apk_path):
|
||||||
|
|
Loading…
Reference in New Issue