[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 06/10] copy-out: new 'excludes' optional argument



On Tue, Feb 14, 2017 at 09:12:07AM +0100, Pino Toscano wrote:
> Add a new 'excludes' optional argument to copy-out, passing it straight
> to tar-out: this way it is possible to exclude files when extracting a
> directory from the guest.
> ---
>  generator/actions.ml | 16 ++++++++++++++--
>  gobject/Makefile.inc |  2 ++
>  lib/copy-in-out.c    | 13 ++++++++++---
>  3 files changed, 26 insertions(+), 5 deletions(-)
> 
> diff --git a/generator/actions.ml b/generator/actions.ml
> index 990eacb..fd6cc9f 100644
> --- a/generator/actions.ml
> +++ b/generator/actions.ml
> @@ -3437,8 +3437,9 @@ Wildcards cannot be used." };
>  
>    { defaults with
>      name = "copy_out"; added = (1, 29, 24);
> -    style = RErr, [Pathname "remotepath"; String "localdir"], [];
> +    style = RErr, [Pathname "remotepath"; String "localdir"], [OStringList "excludes"];

This change seems reasonable.  Should we:

(1) Bind other tar-out parameters?  It looks as if numericowner,
xattrs, selinux and acls would all be candidates.

(2) More importantly for this patch, keep the order of the options
compatible with tar-out?  This would allow us to pass the
optargs_bitmask straight through, if that's an advantage (it may not
be). The 'compressed' optarg for tar-out makes this a bit more
complicated.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]