Re: [Libguestfs] [PATCH] customize: Move virt-customize-related code to a separate directory.

Pino Toscano
2014-03-19T17:19:39Z

On Tuesday 18 March 2014 16:08:55 Richard W.M. Jones
wrote:
> Split virt-builder into build and customize steps, so that we can spin
> off a separate tool called 'virt-customize'.  This commit does not
in
> fact create such a tool, but it moves all the common code into a
> library, in the customize/ subdirectory of the source.

Sounds good at a first look.

While I tried few solutions to not make the list dynamic as the sysprep
operations, I didn't think about making generator do that :)

> Although this is mostly refactoring, it does change the order in which
> virt-builder command line arguments are processed, so they are now
> processed in the order they appear, not the inflexible fixed order
> used before.

I guess this won't matter that much, since people would have not been
able to rely on that before.

>  customize/.depend               |  30 +++
>  customize/customize_cmdline.ml  | 183 +++++++++++++
>  customize/customize_cmdline.mli |  75 ++++++

These should be left out, I guess.

>  generator/customize.ml          | 577
++++++++++++++++++++++++++++++++++++++++

Regarding this file: the only thing I would do now is split the actual
list of customize operations in an own file, just like actions.ml has
only the lists of actions.
I know the list of operations won't make this file that big as
actions.ml is, but still would be cleaner to have "data vs
operations".

--
Pino Toscano