← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~dbungert/curtin:flash-kernel-on-reconfigure into curtin:master

 

Review: Approve



Diff comments:

> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index 0c4d7fd..5be7904 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -1693,13 +1687,25 @@ def configure_kernel_crash_dumps(cfg, target: pathlib.Path) -> None:
>          kernel_crash_dumps.manual_disable(target)
>  
>  
> +def fk_env():

Minor: maybe "flash_kernel_env"?

> +    env = os.environ.copy()
> +    # recent flash_kernel has checks to prevent it running in cases
> +    # like containers or chroots, but we actually want that as curtin
> +    # is mostly or always doing chroot installs.  LP: #1992990
> +    env["FK_FORCE"] = "yes"
> +    env["FK_FORCE_CONTAINER"] = "yes"
> +
> +    return env
> +
> +
>  def reconfigure_kernel(target: pathlib.Path) -> None:
>      with util.ChrootableTarget(target) as in_chroot:
>          # re-run kernel postinstall hooks
>          for kernel in distro.dpkg_query_list_kernels(target):
>              in_chroot.subp(
>                  ['dpkg-reconfigure', '--frontend=noninteractive', kernel],
> -                target=target
> +                target=target,
> +                env=fk_env(),
>              )
>  
>  


-- 
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/484244
Your team curtin developers is subscribed to branch curtin:master.



References