forked from Mirror/pmbootstrap
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:
parent
f30b1cc3f2
commit
ce0f1c2d4a
23 changed files with 127 additions and 115 deletions
|
@ -41,7 +41,7 @@ def replace_apkbuild(args, pkgname, key, new, in_quotes=False):
|
|||
replace(path, "\n" + line_old + "\n", "\n" + line_new + "\n")
|
||||
|
||||
# Verify
|
||||
del (args.cache["apkbuild"][path])
|
||||
del (pmb.helpers.other.cache["apkbuild"][path])
|
||||
apkbuild = pmb.parse.apkbuild(args, path)
|
||||
if apkbuild[key] != str(new):
|
||||
raise RuntimeError("Failed to set '{}' for pmaport '{}'. Make sure"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue