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

@ -416,7 +416,7 @@ def arguments_newapkbuild(subparser):
def arguments_kconfig(subparser):
# Allowed architectures
arch_native = pmb.parse.arch.alpine_native()
arch_native = pmb.config.arch_native
arch_choices = set(pmb.config.build_device_architectures + [arch_native])
# Kconfig subparser
@ -476,7 +476,7 @@ def arguments_repo_missing(subparser):
if argcomplete:
package.completer = package_completer
ret.add_argument("--arch", choices=pmb.config.build_device_architectures,
default=pmb.parse.arch.alpine_native())
default=pmb.config.arch_native)
ret.add_argument("--built", action="store_true",
help="include packages which exist in the binary repos")
ret.add_argument("--overview", action="store_true",
@ -523,7 +523,7 @@ def add_packages_arg(subparser, name="packages", *args, **kwargs):
def arguments():
parser = argparse.ArgumentParser(prog="pmbootstrap")
arch_native = pmb.parse.arch.alpine_native()
arch_native = pmb.config.arch_native
arch_choices = set(pmb.config.build_device_architectures + [arch_native])
mirrors_pmos_default = pmb.config.defaults["mirrors_postmarketos"]