[augeas-devel] Proposed changes in IniFile

David Lutterkort lutter at redhat.com
Wed Feb 6 20:29:55 UTC 2013


Hi Raphael,

On Fri, 2013-01-11 at 00:31 +0100, Raphaël Pinson wrote:
> Last update for the day:
> 
> I've made new changes to support other features by default:
> 
> * IniFile now supports doseol by default, because there's often
> (sadly) IniFiles can use \r\n as eol. The IniFile-based lenses have
> been fixed accordingly;
> * There are now entry_generic and entry_multiline_generic definitions
> allowing to avoid redefining too much in lenses, when # and ; are
> allowed in values for example.
> 
> Again, these changes require a few adaptions in existing IniFile-based
> lenses. The diff in the patch series [1] demonstrates the kind of
> changes that are necessary to make, essentially:
> 
> * Excluding \r as well as \n from values because of the doseol
> support;
> * Fixing definitions using deprecated IniFile definitions (such as
> sto_to_eol or sto_to_comment). I could optionally keep these in
> inifile.aug for compatibility purpose, even though they are not used
> anymore;

Yes, they should stay around, with a deprecation warning in the comment.

> * Changing { "#comment" } into {} in test files since empty comments
> are mapped as empty nodes;
> * Fixing double quoted values in tests (and code) since smart quotes
> are used.
> 
> All these are not huge changes but they do require editing/debugging,
> although I believe the benefits are well worth it (more standard
> lenses, support for smart quotes, simple to use "loose" lenses, doseol
> support).

All these changes make sense to me; my only comment is that your patch
series needs to be modified a bit: you have to make sure that all the
tests pass after each patch (to preserve bisectability), which means
that you have to combine any change to IniFile with all the fixups
required in lenses.

We also need to make sure your notes on the changes make it into the
release notes etc. Just add them to the NEWS file already so we won't
forget that.

David





More information about the augeas-devel mailing list