args.arch_native: remove (MR 2130)

Replace "args.arch_native" with the direct function call 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-16 18:33:27 +02:00 committed by Oliver Smith
parent f2966e62ae
commit caf7973e24
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
24 changed files with 57 additions and 64 deletions

View file

@ -96,7 +96,7 @@ def apkindex_files(args, arch=None, user_repository=True, pmos=True,
:returns: list of absolute APKINDEX.tar.gz file paths
"""
if not arch:
arch = args.arch_native
arch = pmb.config.arch_native
ret = []
# Local user repository (for packages compiled with pmbootstrap)
@ -209,7 +209,7 @@ def alpine_apkindex_path(args, repo="main", arch=None):
raise RuntimeError("Invalid Alpine repository: " + repo)
# Download the file
arch = arch or args.arch_native
arch = arch or pmb.config.arch_native
update(args, arch)
# Find it on disk