forked from Mirror/pmbootstrap
pmb.config.init: Reformat some strings (MR 2535)
We extended the maximum line length at some point, so let's make use of it. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
86aec42713
commit
cda5d61593
1 changed files with 22 additions and 34 deletions
|
@ -406,9 +406,8 @@ def ask_for_device_kernel(config: Config, device: str) -> str:
|
||||||
logging.info("Downstream kernels are typically the outdated Android kernel forks.")
|
logging.info("Downstream kernels are typically the outdated Android kernel forks.")
|
||||||
if "downstream" in kernels and len(kernels) > 1:
|
if "downstream" in kernels and len(kernels) > 1:
|
||||||
logging.info(
|
logging.info(
|
||||||
"Upstream kernels (mainline, stable, ...) get security"
|
"Upstream kernels (mainline, stable, ...) get security updates, but may have less"
|
||||||
" updates, but may have less working features than"
|
" working features than downstream kernels."
|
||||||
" downstream kernels."
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# list kernels
|
# list kernels
|
||||||
|
@ -451,9 +450,8 @@ def ask_for_device(context: Context) -> tuple[str, bool, str]:
|
||||||
codenames = []
|
codenames = []
|
||||||
if new_vendor:
|
if new_vendor:
|
||||||
logging.info(
|
logging.info(
|
||||||
f"The specified vendor ({vendor}) could not be found in"
|
f"The specified vendor ({vendor}) could not be found in existing ports, do you want"
|
||||||
" existing ports, do you want to start a new"
|
" to start a new port?"
|
||||||
" port?"
|
|
||||||
)
|
)
|
||||||
if not pmb.helpers.cli.confirm(default=True):
|
if not pmb.helpers.cli.confirm(default=True):
|
||||||
continue
|
continue
|
||||||
|
@ -475,8 +473,7 @@ def ask_for_device(context: Context) -> tuple[str, bool, str]:
|
||||||
if device_path is None:
|
if device_path is None:
|
||||||
if device == context.config.device:
|
if device == context.config.device:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"This device does not exist anymore, check"
|
"This device does not exist anymore, check <https://postmarketos.org/renamed>"
|
||||||
" <https://postmarketos.org/renamed>"
|
|
||||||
" to see if it was renamed"
|
" to see if it was renamed"
|
||||||
)
|
)
|
||||||
logging.info(f"You are about to do a new device port for '{device}'.")
|
logging.info(f"You are about to do a new device port for '{device}'.")
|
||||||
|
@ -518,13 +515,10 @@ def ask_for_additional_options(config: Config) -> None:
|
||||||
|
|
||||||
# Extra space
|
# Extra space
|
||||||
logging.info(
|
logging.info(
|
||||||
"Set extra free space to 0, unless you ran into a 'No space"
|
"Set extra free space to 0, unless you ran into a 'No space left on device' error. In that"
|
||||||
" left on device' error. In that case, the size of the"
|
" case, the size of the rootfs could not be calculated properly on your machine, and we"
|
||||||
" rootfs could not be calculated properly on your machine,"
|
" need to add extra free space to make the image big enough to fit the rootfs"
|
||||||
" and we need to add extra free space to make the image big"
|
" (pmbootstrap#1904). How much extra free space do you want to add to the image (in MB)?"
|
||||||
" enough to fit the rootfs (pmbootstrap#1904)."
|
|
||||||
" How much extra free space do you want to add to the image"
|
|
||||||
" (in MB)?"
|
|
||||||
)
|
)
|
||||||
# TODO: The __setattr__ implementation in Config does handle the conversions here,
|
# TODO: The __setattr__ implementation in Config does handle the conversions here,
|
||||||
# but mypy doesn't understand this (yet?), so we have to do it explicitly.
|
# but mypy doesn't understand this (yet?), so we have to do it explicitly.
|
||||||
|
@ -547,11 +541,9 @@ def ask_for_additional_options(config: Config) -> None:
|
||||||
|
|
||||||
# Ccache size
|
# Ccache size
|
||||||
logging.info(
|
logging.info(
|
||||||
"We use ccache to speed up building the same code multiple"
|
"We use ccache to speed up building the same code multiple times. How much space should the"
|
||||||
" times. How much space should the ccache folder take up per"
|
" ccache folder take up per architecture? After init is through, you can check the current"
|
||||||
" architecture? After init is through, you can check the"
|
" usage with 'pmbootstrap stats'. Answer with 0 for infinite."
|
||||||
" current usage with 'pmbootstrap stats'. Answer with 0 for"
|
|
||||||
" infinite."
|
|
||||||
)
|
)
|
||||||
regex = "0|[0-9]+(k|M|G|T|Ki|Mi|Gi|Ti)"
|
regex = "0|[0-9]+(k|M|G|T|Ki|Mi|Gi|Ti)"
|
||||||
answer = pmb.helpers.cli.ask(
|
answer = pmb.helpers.cli.ask(
|
||||||
|
@ -561,11 +553,10 @@ def ask_for_additional_options(config: Config) -> None:
|
||||||
|
|
||||||
# Sudo timer
|
# Sudo timer
|
||||||
logging.info(
|
logging.info(
|
||||||
"pmbootstrap does everything in Alpine Linux chroots, so"
|
"pmbootstrap does everything in Alpine Linux chroots, so your host system does not get"
|
||||||
" your host system does not get modified. In order to"
|
" modified. In order to work with these chroots, pmbootstrap calls 'sudo' internally. For"
|
||||||
" work with these chroots, pmbootstrap calls 'sudo'"
|
" long running operations, it is possible that you'll have to authorize sudo more than"
|
||||||
" internally. For long running operations, it is possible"
|
" once."
|
||||||
" that you'll have to authorize sudo more than once."
|
|
||||||
)
|
)
|
||||||
answer_background_timer = pmb.helpers.cli.confirm(
|
answer_background_timer = pmb.helpers.cli.confirm(
|
||||||
"Enable background timer to prevent repeated sudo authorization?",
|
"Enable background timer to prevent repeated sudo authorization?",
|
||||||
|
@ -669,9 +660,8 @@ def ask_for_ssh_keys(ssh_key_glob: str, default: bool) -> bool:
|
||||||
|
|
||||||
def ask_build_pkgs_on_install(default: bool) -> bool:
|
def ask_build_pkgs_on_install(default: bool) -> bool:
|
||||||
logging.info(
|
logging.info(
|
||||||
"After pmaports are changed, the binary packages may be"
|
"After pmaports are changed, the binary packages may be outdated. If you want to install"
|
||||||
" outdated. If you want to install postmarketOS without"
|
" postmarketOS without changes, reply 'n' for a faster installation."
|
||||||
" changes, reply 'n' for a faster installation."
|
|
||||||
)
|
)
|
||||||
return pmb.helpers.cli.confirm(
|
return pmb.helpers.cli.confirm(
|
||||||
"Build outdated packages during 'pmbootstrap install'?", default=default
|
"Build outdated packages during 'pmbootstrap install'?", default=default
|
||||||
|
@ -690,9 +680,8 @@ def get_locales() -> list[str]:
|
||||||
def ask_for_locale(current_locale: str) -> str:
|
def ask_for_locale(current_locale: str) -> str:
|
||||||
locales = get_locales()
|
locales = get_locales()
|
||||||
logging.info(
|
logging.info(
|
||||||
"Choose your preferred locale, like e.g. en_US. Only UTF-8"
|
"Choose your preferred locale, like e.g. en_US. Only UTF-8 is supported, it gets appended"
|
||||||
" is supported, it gets appended automatically. Use"
|
" automatically. Use tab-completion if needed."
|
||||||
" tab-completion if needed."
|
|
||||||
)
|
)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
@ -782,9 +771,8 @@ def frontend(args: PmbArgs) -> None:
|
||||||
|
|
||||||
# Extra packages to be installed to rootfs
|
# Extra packages to be installed to rootfs
|
||||||
logging.info(
|
logging.info(
|
||||||
"Additional packages that will be installed to rootfs."
|
"Additional packages that will be installed to rootfs. Specify them in a comma separated"
|
||||||
" Specify them in a comma separated list (e.g.: vim,file)"
|
' list (e.g.: vim,file) or "none"'
|
||||||
' or "none"'
|
|
||||||
)
|
)
|
||||||
extra = pmb.helpers.cli.ask(
|
extra = pmb.helpers.cli.ask(
|
||||||
"Extra packages", None, config.extra_packages, validation_regex=r"^([-.+\w]+)(,[-.+\w]+)*$"
|
"Extra packages", None, config.extra_packages, validation_regex=r"^([-.+\w]+)(,[-.+\w]+)*$"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue