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

Re: [Libguestfs] [PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)



On Mon, Sep 22, 2014 at 10:49:42AM +0200, Pino Toscano wrote:
> The lenses in our custom path need the system lens for base
> definitions. Disabling the system path was worthless anyway, since our
> API does not allow user-specified custom paths.
> 
> The only possible use for AUG_NO_STDINC to aug-init could have been to
> not load the lenses right at init time loading them later; however, this
> is what the AUG_NO_LOAD flag (= 32) does already.
> ---
>  daemon/augeas.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/daemon/augeas.c b/daemon/augeas.c
> index ce49726..4f1d9a8 100644
> --- a/daemon/augeas.c
> +++ b/daemon/augeas.c
> @@ -133,6 +133,11 @@ do_aug_init (const char *root, int flags)
>      return -1;
>    }
>  
> +  /* Filter out AUG_NO_STDINC, since the lenses in our custom path
> +   * need the lenses from the system path.
> +   */
> +  flags &= ~AUG_NO_STDINC;

This is wrong.  It should be possible to specify this, plus it is
specified in the API.

The right solution is to get all the required Augeas lenses into
Fedora & RHEL 7.1 (backporting the upstream patches if necessary),
then remove the hacks from libguestfs.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html


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