pmbootstrap build, install: require repo_bootstrap (MR 2273)

Make sure that if systemd is selected, the repo_bootstrap is done before
the "pmbootstrap build" and "pmbootstrap install" commands can be used.
This commit is contained in:
Oliver Smith 2024-02-25 15:56:28 +01:00
parent fafd4e7304
commit 266bfc31cd
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 40 additions and 0 deletions

View file

@ -111,6 +111,12 @@ def build(args):
if src and not os.path.exists(src):
raise RuntimeError("Invalid path specified for --src: " + src)
# Ensure repo_bootstrap is done for all arches we intend to build for
for package in args.packages:
arch_package = args.arch or pmb.build.autodetect.arch(args, package)
pmb.helpers.repo_bootstrap.require_bootstrap(args, arch_package,
f"build {package} for {arch_package}")
# Build all packages
for package in args.packages:
arch_package = args.arch or pmb.build.autodetect.arch(args, package)
@ -251,6 +257,10 @@ def install(args):
raise ValueError("Installation using rsync"
" is not currently supported on btrfs filesystem.")
pmb.helpers.repo_bootstrap.require_bootstrap(args, args.deviceinfo["arch"],
f"do 'pmbootstrap install' for {args.deviceinfo['arch']}"
" (deviceinfo_arch)")
# On-device installer checks
# Note that this can't be in the mutually exclusive group that has most of
# the conflicting options, because then it would not work with --disk.