[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [augeas-devel] Setting nodes with empty values (0.7 regression?)

On Thu, 2010-01-28 at 20:50 +1100, Matthew Palmer wrote:
> We've got an internal lens that, for various mostly-sane reasons, uses a key
> with no value (because we want to set modifiers on it in subkeys).  In 0.5,
> we could just do:
>     set /files/etc/x/y/z/A null
> And the save would succeed.  When we reloaded the file, we'd see
>     /files/etc/x/y/z/A (none)
> And all would be happy.  In 0.7, however, attempting to do this results in
> the message:
> message = Failed to match
>     ({ /[^\001-\004\t\n ,/A-Z\\]+/ } | { /A|L|U|K|P/ })({ /[^\001-\004\t\n ,/A-Z\\]+/ } | { /A|L|U|K|P/ })*
>   with tree
>     { "A" = "null" }
> Now, I expect this is due to the value matching code that got introduced a
> while ago (so I guess this is all my own fault, in a way), but I'm wondering
> if there's any way to work around this, or perhaps relax the requirement in
> sublenses that don't have a value regex at all?

Both augtool and the Augeas type for puppet have a 'clear' command that
you can use to set the value of a node to NULL - does that work for
you ?

> For reference, I can use "set /files/etc/x/y/z/A ''" to do the right thing
> in augtool, but I need to do this edit in the Puppet type, which maintains
> it's reputation for being epsilon short of being just too damned painful to
> use.

Anything I can do to make it more usable ?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]