[augeas-devel] Is augeas weak for sysconfig files, or missing something?

David Lutterkort lutter at redhat.com
Thu Apr 12 22:27:27 UTC 2012


On Wed, 2012-03-28 at 13:27 +0200, Michal Filka wrote:
> I don't understand one thing. Why is sysconfig.aug present when it  
> contains such bugs and can be replaced by shellvars.aug?

As Dominic said, Sysconfig came about as a simplified Shellvars lens
that would strip quotes out - not as successfully as one might hope, as
you've discovered.

I looked at it a while ago, and haven't figured out a proper fix yet,
either. There seem to be two options on how to tackle the problem of
parsing and stripping the quotes off a string:

     1. Enhance the square lens: right now 'square RE LENS' is roughly
        the same as 'key RE . LENS . del RE STR', with the constraint
        that key and del operate on exactly the same string; we could
        change it so that it would become 'square L1 L2 L3' equivalent
        to 'L1 . L2 . L3' and the constraint that L1 and L3 operate on
        identical strings - I haven't convinced myself that that will
        address all the quoting issues
     2. Add a 'quoted' lens primitive, roughly equivalent to the
        tortuous Sysconfig.assign, but written in C. The question is: do
        we need to worry about differences in quoted string syntax ? Can
        we just implement Bash syntax ? Or will we need variants for
        other string syntaxes ?

David





More information about the augeas-devel mailing list