pkg resolve: add more verbose logs

Make debugging easier with more logs in e.g.
$ pmbootstrap --verbose install

Reviewed-By: Clayton (via chat)
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231121213640.2237-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
Oliver Smith 2023-11-21 22:36:29 +01:00
parent c0937a52dc
commit 6a77991bb7
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,8 @@ def skip_already_built(pkgname, arch):
logging.verbose(pkgname + ": already checked this session,"
" no need to build it or its dependencies")
return True
logging.verbose(f"{pkgname}: marking as already built")
pmb.helpers.other.cache["built"][arch].append(pkgname)
return False
@ -488,6 +490,8 @@ def package(args, pkgname, arch=None, force=False, strict=False,
:returns: None if the build was not necessary
output path relative to the packages folder ("armhf/ab-1-r2.apk")
"""
logging.verbose(f"{pkgname}: running pmb.build._package.package")
# Once per session is enough
arch = arch or pmb.config.arch_native
if skip_already_built(pkgname, arch):