Hello David,
thank you very much for looking into this (even more so since I gave up on it already)! J I'm quite relieved, that this was not an issue created by my own stupidity. Ciao, Xavier. From: David Lutterkort [mailto:[email protected]] Sent: Thursday, November 26, 2015 3:11 AM To: Mol, Xavier (SCC) Cc: Dominic Cleal; [email protected] Subject: Re: [augeas-devel] Inconsistent matching of multiple predicates (involving last/position) Sorry for the very late reply ... On Fri, Aug 28, 2015 at 5:24 AM, Mol, Xavier (SCC) <[email protected]> wrote: Hi again, for some reason I cannot explain, now a couple of things work suddenly as expected: augtool> match $master/*[last()] /files/etc/auto.master/3 = + augtool> match $master/*[position() = 2] /files/etc/auto.master/#comment[1] = Sample auto.master file augtool> match $master/*[label() != '#comment'][last()] /files/etc/auto.master/3 = + Though not everything does... augtool> match $master/*[label() != '#comment'] /files/etc/auto.master/1 = /misc /files/etc/auto.master/2 = /net /files/etc/auto.master/3 = + augtool> match $master/*[label() != '#comment'][position() = 2] (no matches) This is a bona fide bug - "match $master/*[label() != '#comment'][2]" should absolutely return the $master/2 node. What's going wrong is that the tree has a bunch of 'hidden' nodes (nodes whose label is NULL); they weren't being suppressed properly during the match; in that last match, we actually matched such a hidden node, but when Augeas goes to print the result it acts as if there was no node (hence the name 'hidden') I've put up https://github.com/hercules-team/augeas/pull/323 that fixes that issue. David
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
