curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02985
Re: [Merge] ~mwhudson/curtin:more-grub-config-object into curtin:master
Diff comments:
> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index 868fbad..b41c8b0 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -763,19 +768,19 @@ def setup_grub(cfg, target, osfamily, variant):
> get_path_to_storage_volume(item_id, storage_cfg_odict))
>
> if len(storage_grub_devices) > 0:
> - if len(grubcfg.get('install_devices', [])):
> + if grubcfg.install_devices is not None and \
> + len(grubcfg.install_devices) > 0:
My impression was that the original code handled install_devices being the empty list, None and absent differently but perhaps I should meditate on that for a moment now I've got everything else moved over and can be a bit less impatient about it.
> LOG.warn("Storage Config grub device config takes precedence "
> "over grub 'install_devices' value, ignoring: %s",
> grubcfg['install_devices'])
> - grubcfg['install_devices'] = storage_grub_devices
> -
> - LOG.debug("install_devices: %s", grubcfg.get('install_devices'))
> - if 'install_devices' in grubcfg:
> - instdevs = grubcfg.get('install_devices')
> - if isinstance(instdevs, str):
> - instdevs = [instdevs]
> - if instdevs is None:
> - LOG.debug("grub installation disabled by config")
> + grubcfg.install_devices = storage_grub_devices
> +
> + LOG.debug("install_devices: %s", grubcfg.install_devices)
> + if grubcfg.install_devices is None:
> + LOG.debug("grub installation disabled by config")
> + instdevs = grubcfg.install_devices
> + elif len(grubcfg.install_devices) > 0:
> + instdevs = grubcfg.install_devices
> else:
> # If there were no install_devices found then we try to do the right
> # thing. That right thing is basically installing on all block
--
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/444608
Your team curtin developers is subscribed to branch curtin:master.
References