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

Mol, Xavier (SCC) xavier.mol at kit.edu
Mon Dec 21 09:39:10 UTC 2015


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."
****

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gridmapfile.aug
Type: application/octet-stream
Size: 1544 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20151221/aebe0cb1/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6401 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20151221/aebe0cb1/attachment.p7s>


More information about the augeas-devel mailing list