args.cache: remove (MR 2136)

Replace "args.cache" with a global variable in order to
avoid passing "args" to all functions. This is a step to get rid of this
args-passed-to-all-functions pattern in pmbootstrap.
This commit is contained in:
BO41 2021-10-30 14:20:57 +02:00 committed by Oliver Smith
parent f30b1cc3f2
commit ce0f1c2d4a
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
23 changed files with 127 additions and 115 deletions

View file

@ -34,7 +34,7 @@ def package(args, pkgname, reason="", dry=False):
pmb.helpers.file.replace(path, old, new)
# Verify
del(args.cache["apkbuild"][path])
del(pmb.helpers.other.cache["apkbuild"][path])
apkbuild = pmb.parse.apkbuild(args, path)
if int(apkbuild["pkgrel"]) != pkgrel_new:
raise RuntimeError("Failed to bump pkgrel for package '" + pkgname +