[augeas-devel] Avoiding wheel reinvention with dpkg.cfg, and setting empty things.

Raphaël Pinson raphink at gmail.com
Wed Dec 31 10:32:41 UTC 2008


Hi Robin,


Thank you for this nice lens. I see you've been putting quite a lot of info
in comments in there. It would be nice if you could document using the
standards described on [0], so your module can be included in [1].


Regards,


Raphaël


[0] http://augeas.net/page/Documenting_your_modules
[1] http://augeas.net/docs/references/lenses




On Wed, Dec 31, 2008 at 10:35 AM, Robin Lee Powell <
rlpowell at digitalkingdom.org> wrote:

> On Wed, Dec 31, 2008 at 01:28:30AM -0800, Robin Lee Powell wrote:
> > On Tue, Dec 30, 2008 at 04:19:08PM -0800, Robin Lee Powell wrote:
> > > On Mon, Dec 29, 2008 at 09:54:13PM -0800, David Lutterkort wrote:
> > > > >   let bare_option = [ label "bare_option" . store word ]
> > > > >
> > > > >   let valued_option = [ label "value_option" . store word ] .
> sep_spc .
> > > > >                         [ label "value" . store word ]
> > > > >   let record = [ seq "option" . ( bare_option | valued_option ) .
> eol ]
> > > >
> > > > Why don't you use the name of the option as a key and store the value
> > > > for that option as the value of the tree node ? Something along the
> > > > lines of (untested):
> > > >
> > > >         let record = [ key word . (sep_spc . store word)? . eol ]
> > > >
> > > > That would producea much more compact and readable tree.
> > >
> > > Because I have no idea what I'm doing.  :)  I just grabbed the
> > > fstab lens and flailed.
> >
> > It turns out that with that method I can't figure out how to set a
> > bare option.  That is, I get things like:
> >
> > augtool> ls /files/etc/dpkg/dpkg.cfg
> > #comment[1] = dpkg configuration file
> > #comment[2] = This file can contain default options for dpkg.  All
> command-line
> > [snip]
> > no-debsig = (none)
> >
> > but I can't figure out how to set an option like no-debsig, with no
> > value.
>
> NM; figured it out.  Test and lens attached.
>
> -Robin
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20081231/25600abb/attachment.htm>


More information about the augeas-devel mailing list