[augeas-devel] Re: [PATCH] Support empty comments, like lines beginning with "; " or "#" but without any more text

Free Ekanayaka free at 64studio.com
Wed Aug 27 14:44:54 UTC 2008


|--==> On Wed, 27 Aug 2008 16:39:21 +0200, "Raphaël Pinson" <raphink at gmail.com> said:

  RP> On Wed, Aug 27, 2008 at 4:16 PM, Free Ekanayaka <free at 64studio.com> wrote:
  >>Hi Raphaël,
  >>
  >>|--==> On Wed, 27 Aug 2008 12:48:08 +0200, "Raphaël Pinson" <
  >>raphink at gmail.com> said:
  >>
  RP> Now that's where I was left experimenting last week, and was down to
  >>that
  RP> same state. But then, I did something like this (which I cannot do
  >>right now
  RP> because I've played so much that my inifile.aug is broken on this
  >>machine
  RP> ;)).
  >>
  RP> * fire up augtool
  RP> * print an INI File with empty comments in it ('# \n' for example)
  RP> * change a value in this INI File (whatever value, really)
  RP> * save
  >>
  RP> When I tried this, augeas refused to save (since version 0.3.0, it
  >>worked
  RP> before), saying that NULL is not a proper value for the "#comment"
  >>node.
  RP> I've since tried with other stuff, like empty values in dput.aug (e.g.
  RP> 'pre_upload_command =', which is fine) and get the same result.
  >>
  RP> Could you try it on your side Free?
  >>
  >>It happens here too, I'm using the bleeding-edge version from hg. To
  >>reproduce it:
  >>
  >>cat <<EOF > fakeroot/etc/dput.cf
  >>#
  >>[DEFAULT]
  >>login = username
  >>EOF
  >>
  >>cat <<EOF | augtool -I lenses/ -r fakeroot/
  >>set /file/etc/dput.cf/target/login me
  >>save
  >>EOF


  RP> Try

  RP> cat <<EOF | augtool -I lenses/ -r fakeroot/
  RP> set /files/etc/dput.cf/target/login me
  RP> save
  RP> get /augeas/files/etc/dput.cf/error/message
  RP> EOF

  RP> To get more info

Thanks for the tip. I get:

augtool> augtool> Saving failed
augtool> /augeas/files/etc/dput.cf/error/message = Can not store a nonexistent (NULL) value
augtool> 

Ciao,

Free




More information about the augeas-devel mailing list