curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #03458
Re: [Merge] ~cpete/curtin:cdrom-info into curtin:master
Diff comments:
> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index 63a24fe..3913002 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -920,6 +920,32 @@ def copy_crypttab(crypttab, target):
> shutil.copy(crypttab, os.path.sep.join([target, 'etc/crypttab']))
>
>
> +def copy_cdrom(cdrom: str, target: str) -> None:
> + """Copy installation media metadata"""
> +
> + base: str = f"{cdrom}/.disk"
> + ubuntu_dist_channel: str = f"{base}/ubuntu_dist_channel"
> + media_info: str = f"{base}/info"
> +
> + logdir: str = os.path.sep.join([target, "/var/log/installer"])
> + util.ensure_dir(logdir)
> +
> + libdir: str = os.path.sep.join([target, "/var/lib"])
> + util.ensure_dir(libdir)
> +
> + if os.path.exists(media_info):
> + LOG.info("copying media-info into target")
> + shutil.copy(media_info, f"{logdir}/media-info")
> + else:
> + LOG.warn(f"{media_info} not found, skipping")
> +
> + if os.path.exists(ubuntu_dist_channel):
> + LOG.info("copying ubuntu_dist_channel into target")
> + shutil.copy(ubuntu_dist_channel, f"{libdir}/ubuntu_dist_channel")
> + else:
> + LOG.warn(f"{ubuntu_dist_channel} not found, skipping")
Please use LOG.warning instead.
> +
> +
> def copy_iscsi_conf(nodes_dir, target, target_nodes_dir='etc/iscsi/nodes'):
> if not nodes_dir:
> LOG.warn("nodes directory must be specified, not copying")
--
https://code.launchpad.net/~cpete/curtin/+git/curtin/+merge/462092
Your team curtin developers is subscribed to branch curtin:master.
References