[augeas-devel] Avoiding wheel reinvention with dpkg.cfg, and setting empty things.
Robin Lee Powell
rlpowell at digitalkingdom.org
Wed Dec 31 09:28:30 UTC 2008
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.
Setting options with values is just:
set /files/etc/dpkg/dpkg.cfg/testopt 1
-Robin
--
They say: "The first AIs will be built by the military as weapons."
And I'm thinking: "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
More information about the augeas-devel
mailing list