[augeas-devel] Re: [Augeas] #56: last()+1 doesn't behave very logically
Augeas
trac at fedorahosted.org
Wed Apr 1 18:12:41 UTC 2009
#56: last()+1 doesn't behave very logically
----------------------+-----------------------------------------------------
Reporter: raphink | Owner: lutter
Type: defect | Status: closed
Priority: minor | Milestone: next
Component: Augeas | Version: devel
Resolution: wontfix | Keywords:
----------------------+-----------------------------------------------------
Changes (by lutter):
* status: new => closed
* resolution: => wontfix
Comment:
The problem is that both behaviors are reasonable - the path expression
simply doesn't have enough enough information to control where a missing
node should be created; I therefore think that always creating them as the
last child of their parent is at least consistent.
As you note, you need to use aug_insert if you need more control over
where nodes should be created - in general, creating from just a path
expression isn't well-defined, anyway; for example, what should happen for
"set /a/b/c[../d = 'foo'] bar" if there is no d sibling ?
I agree that it would be nice to embed instructions on what to create when
a path expression does not match; but I have no good ideas on how to
address that
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/56#comment:1>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list