forked from Mirror/pmbootstrap
pmbootstrap install: make building pkgs optional (MR 1951)
Add a question at the end of "pmbootstrap init", to ask if the user wants to build outdated packages during "pmbootstrap install". Store the result in the new pmbootstrap.cfg key "build_pkgs_on_install". I've put it at the end, because it is a rather complicated question compared to the rest. This is useful to speed up the installation for casual users who can now avoid compiling packages. But also for the official images where we only want to ship the official binary packages and not build anything on-the-fly.
This commit is contained in:
parent
0aed64d661
commit
05849a9f80
4 changed files with 29 additions and 3 deletions
|
@ -389,6 +389,15 @@ def ask_for_ssh_keys(args):
|
|||
default=args.ssh_keys)
|
||||
|
||||
|
||||
def ask_build_pkgs_on_install(args):
|
||||
logging.info("After pmaports are changed, the binary packages may be"
|
||||
" outdated. If you want to install postmarketOS without"
|
||||
" changes, reply 'n' for a faster installation.")
|
||||
return pmb.helpers.cli.confirm(args, "Build outdated packages during"
|
||||
" 'pmbootstrap install'?",
|
||||
default=args.build_pkgs_on_install)
|
||||
|
||||
|
||||
def frontend(args):
|
||||
require_programs()
|
||||
|
||||
|
@ -454,6 +463,9 @@ def frontend(args):
|
|||
# pmaports path (if users change it with: 'pmbootstrap --aports=... init')
|
||||
cfg["pmbootstrap"]["aports"] = args.aports
|
||||
|
||||
# Build outdated packages in pmbootstrap install
|
||||
cfg["pmbootstrap"]["build_pkgs_on_install"] = str(ask_build_pkgs_on_install(args))
|
||||
|
||||
# Save config
|
||||
pmb.config.save(args, cfg)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue