Open raphink opened 9 years ago
This is not a problem with Augeas per-se, but with the way Augtool expands strings. defvar
works, because it deals with nodesets, but /augeas/context
must store a string verbatim. Therefore, quoting the string works:
augtool> set /augeas/context /files/etc/passwd/*[uid="0"]
augtool> get /augeas/context
error: Invalid path expression
error: type error
/files/etc/passwd/*[uid=0]|=|
augtool> set /augeas/context '/files/etc/passwd/*[uid="0"]'
augtool> get /augeas/context
/augeas/context = /files/etc/passwd/*[uid="0"]
augtool> match .
/files/etc/passwd/root = (none)
Should this be fixed somehow?
Setting
/augeas/context
creates new entries:The quotes are missing in the expression, which causes the bug.
This bug doesn't exist with
defvar
for example: