[augeas-devel] Non-empty string from get has turned into empty node for put direction - why?

Raphaël Pinson raphael.pinson at camptocamp.com
Mon Dec 21 09:55:40 UTC 2015


Hello Xavier,


The `mapping` lens has no label since all lenses in

    [ dn . sp . (fqan . sp)? . login . eol ]


are either subnodes (dn, fqan, login) or deletions (sp, eol)


Since Util.empty is also a label-less node, there is an ambiguity in the
tree.


Most likely, you need to rethink `dn` so that it will provide the label for
`mapping`.



Cheers,

Raphaël





On Mon, Dec 21, 2015 at 10:39 AM, Mol, Xavier (SCC) <xavier.mol at kit.edu>
wrote:

> Hello Augeas experts,
>
> attached you can find another custom lens of mine, this time augparse
> identifies "overlapping lenses in tree union.put" and I don't understand
> why. This source file also contains some debugging output, which will
> produce this result:
>
> $ augparse /usr/share/augeas/lenses/gridmapfile.aug
> Concrete type of the 'mapping' regular expression:
> /(([^\t\n \"#]+|\"[^\t\n \"#]+\")|\"[^\n\"]*[\t ]+[^\n\"]*\")[\t
> ]+((([^\t\n \"#]+|\"[^\t\n \"#]+\")|\"[^\n\"]*[\t ]+[^\n\"]*\")[\t
> ]+)?[.0-9A-Z_a-z-]+[\t ]*\n/
> Abstract typeof the 'mapping' regular expression:
> /\003\004/
>
> Syntax error in lens definition
> /usr/share/augeas/lenses/gridmapfile.aug:40.2-.42:Failed to compile lns
> /usr/share/augeas/lenses/gridmapfile.aug:40.14-.39:exception: overlapping
> lenses in tree union.put
>     Example matched by both:  {  }
>     First lens: /usr/share/augeas/lenses/gridmapfile.aug:40.14-.29:
>     Second lens: /usr/share/augeas/lenses/gridmapfile.aug:30.4-.44:
>
>
> The node matched by the 'mapping' lens must be non-empty, which can be
> seen easily at the end of the regular expression, where Rx.word is included
> ([.0-9A-Z_a-z-]+). Yet in the put direction Augeas thinks an empty node can
> be used. Naturally, this is a conflict with Util.empty, which may occur in
> the same place as 'mapping', hence we've got an overlapping lens with
> 'lns'. Can anyone please explain to me why Augeas uses an empty node in the
> put direction for the 'mapping' lens?
>
> Thank you for your time,
> Xavier.
>
> ****
> Karlsruher Institute of Technology (KIT)
> Steinbuch Centre for Computing (SCC)
>
> B. Sc. Xavier Mol
> GridKa Storage Administrator and Support Manager
>
> Hermann-von-Helmholtz-Platz 1
> Geb. 449
> 76344 Eggenstein-Leopoldshafen
> Phone: +49 721 608 23041
> Email: xavier.mol at kit.edu
> www.kit.edu
> KIT - University of the State of Baden-Württemberg and National
> Large-scale Research Center of the Helmholtz Association
> "Since 2010, the KIT has been certified as a family-friendly university."
> ****
>
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel
>



-- 
Raphaël Pinson
Infrastructure Developer & Training Leader
+33 458 482 013

Camptocamp France
Savoie Technolac
BP 352
48, avenue du Lac du Bourget
73372 Le Bourget du Lac, Cedex
www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20151221/05bab23b/attachment.htm>


More information about the augeas-devel mailing list