curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #04091
Re: [Merge] ~sjg1/curtin:ext into curtin:master
2 minor items then we can merge
Diff comments:
> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index b355ae1..3e3849f 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -867,6 +867,36 @@ def translate_old_grub_schema(cfg):
> cfg['boot'] = grub_cfg
>
>
> +def setup_extlinux(
> + cfg: dict,
> + target: str):
> + """Set up an extlinux.conf file
> +
> + :param: cfg: A config dict containing config.BootCfg in cfg['boot'].
> + :param: target: A string specifying the path to the chroot mountpoint.
> + """
> + bootcfg = config.fromdict(config.BootCfg, cfg.get('boot', {}))
> +
> + # If there is a separate boot partition, set fw_boot_dir to empty
> + # storage_cfg = cfg.get('storage', {}).get('config', {})
nit: please remove commented out line
> + fw_boot_dir = '/boot'
> + root = None
> + storage_cfg_dict = extract_storage_ordered_dict(cfg)
> + for item in select_configs(storage_cfg_dict, type='mount'):
> + if item['path'] == '/boot':
> + fw_boot_dir = ''
> + elif item['path'] == '/':
> + root = item
> +
> + if not root:
> + raise ValueError("Storage configuration has no root directory")
> +
> + fdata = block_meta.mount_data(root, storage_cfg_dict)
> + spec = block_meta.resolve_fdata_spec(fdata)
> +
> + install_extlinux(bootcfg, target, fw_boot_dir, spec)
> +
> +
> def setup_boot(
> cfg: dict,
> target: str,
> @@ -1881,13 +1911,13 @@ def redhat_update_dracut_config(target, cfg):
> if 'storage' not in cfg:
> return False
>
> - storage_config = cfg.get('storage', {}).get('config')
These renames are fine but seem unrelated, is this intentional?
> - if not storage_config:
> + storage_cfg = cfg.get('storage', {}).get('config')
> + if not storage_cfg:
> raise ValueError('Invalid storage config')
>
> add_conf = set()
> add_modules = set()
> - for scfg in storage_config:
> + for scfg in storage_cfg:
> if scfg['type'] == 'raid':
> add_conf.add(initramfs_mapping['raid']['conf'])
> add_modules.add(initramfs_mapping['raid']['modules'])
--
https://code.launchpad.net/~sjg1/curtin/+git/curtin/+merge/484176
Your team curtin developers is subscribed to branch curtin:master.
References