curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #03650
Re: [Merge] ~ogayot/curtin:nvmeotcp-poc-blacklist-initramfs-tools into curtin:master
One more suggestion, plus a request for unit tests please.
Diff comments:
> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index 25568b0..edf868d 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -866,6 +866,19 @@ def update_initramfs(target=None, all_kernels=False):
> if update_initramfs_is_disabled(target):
> return
>
> + # Ensure target is resolved even if it's None
> + target = paths.target_path(target)
> +
> + if (pathlib.Path(target) / 'usr/bin/dracut').exists():
This is workable, but I think we can be more direct. We're in the `update_initramfs()` code now, and we may be chrooting into a system that doesn't actually offer an `update-initramfs` to call to. What do you think about checking for that directly instead of inferring it by the presence of dracut?
> + # This check is specifically intended for the Ubuntu NVMe/TCP POC.
> + # When running the POC, we install dracut and remove initramfs-tools
> + # (the packages are mutually exclusive). Therefore, trying to call
> + # update-initramfs would fail.
> + # If we were using a dpkg-divert to disable dracut (we don't do that
> + # currently), we would need to explicitly invoke dracut here instead of
> + # just returning.
> + return
> +
> # We keep the all_kernels flag for callers, the implementation
> # now will operate correctly on all kernels present in the image
> # which is almost always exactly one.
--
https://code.launchpad.net/~ogayot/curtin/+git/curtin/+merge/473058
Your team curtin developers is subscribed to branch curtin:master.
References