[augeas-devel] [PATCH 0 of 3] Fix #4: typecheck of '?' operator
David Lutterkort
lutter at redhat.com
Tue Sep 2 23:08:54 UTC 2008
This fixes the problems with the '?' operator described in ticket #4[1],
with the important bits in patch 2/3
The '?' operator is now properly typechecked. Adding a typecheck also
required fixing some existing lenses - I'd appreciate if somebody would
take a look at the lens changes, and make sure there's nothing fishy.
In particular, I changed the Interfaces.lns in a way I don't entirely like,
since the new lens introduces way more anonymous nodes than should be
necessary; I wasn't able to make that lens work with less anonymous nodes
though. I am not entirely sure about the structure of the file - the man
page on my Etch machine clearly states that comments are not allowed at the
end of a line, and must be on a line of their own, though
test_interfaces.aug goes through great lengths to make sure that that
situation is being processed. Free, can you shed some light on that ?
There's a better way to fix this bug, i.e. one that doesn't need to
special-case (store re)?, but that would require a major rewrite of the
parsing machinery: instead of just encoding tree labels and making all
decisions during put based on them, we could encode both labels and values
into a string, and base our decisions during put on matching against
that. I started down that road, but that proved to be a bigger endeavor
than I thought, and is therefore left for some point in the future ;)
David
[1] https://fedorahosted.org/augeas/ticket/4
13 files changed, 100 insertions(+), 48 deletions(-)
lenses/interfaces.aug | 6 +----
lenses/sudoers.aug | 9 ++++---
lenses/tests/test_fstab.aug | 7 +++---
lenses/tests/test_interfaces.aug | 7 +++---
src/builtin.c | 5 ++++
src/get.c | 8 +++----
src/lens.c | 41 ++++++++++++++++++++----------------
src/lens.h | 2 -
src/put.c | 30 ++++++++++++++++----------
src/regexp.c | 4 +++
src/syntax.h | 3 ++
tests/modules/fail_del_maybe.aug | 7 ++++++
tests/modules/pass_store_maybe.aug | 19 ++++++++++++++++
More information about the augeas-devel
mailing list