← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~mwhudson/curtin:image-action into curtin:master

 

Review: Needs Information



Diff comments:

> diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py
> index aae85c6..372fa86 100644
> --- a/curtin/commands/block_meta.py
> +++ b/curtin/commands/block_meta.py
> @@ -81,7 +83,10 @@ CMD_ARGUMENTS = (
>  @logged_time("BLOCK_META")
>  def block_meta(args):
>      # main entry point for the block-meta command.
> -    state = util.load_command_environment(strict=True)
> +    if not args.testmode:

nitpick: if we do 'if args.testmode' instead it'll help mirror stuff down lower, and I find it a little easier to read.

> +        state = util.load_command_environment(strict=True)
> +    else:
> +        state = {}
>      cfg = config.load_command_config(args, state)
>      dd_images = util.get_dd_images(cfg.get('sources', {}))
>  
> @@ -1992,6 +2022,10 @@ def meta_custom(args):
>                            (item_id, type(error).__name__, error))
>                  raise
>  
> +    if args.testmode:
> +        for dev in DEVS:
> +            util.subp(['losetup', '--detach', dev])

Can losetup detach multiple in one go?  
`losetup -d loopdev...`
The 3 dots make me wonder.

> +
>      if args.umount:
>          util.do_umount(state['target'], recursive=True)
>      return 0


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



References