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

Robin Lee Powell rlpowell at digitalkingdom.org
Mon Dec 29 20:01:25 UTC 2008


On Mon, Dec 29, 2008 at 11:56:48AM -0800, Robin Lee Powell wrote:
> On Sun, Dec 28, 2008 at 08:52:14PM -0800, Robin Lee Powell wrote:
> > 
> > So I'm trying to work with debian's /etc/dpkg/dpkg.cfg.  It's
> > incredibly simple: # comments, real lines are command-line options
> > names, possibly with a space-seperated single argument, i.e.:
> 
> Ended up writing it myself.  I'm pasting it below because I hit a
> segfault in Augeas:
> 
> - ----------------
> 
> (* Parsing /etc/dpkg/dpkg.cfg *)

It just occured to me that y'all might actually add this to the
lenses repo, in which case I'd like to add some descriptive
commentary (something the extant lenses are staggeringly short on,
I'd like to add).

- -------------

(*

dpkg.cfg is a simple list of options, the same ones as the command
line options, with or without a value.

The Augeas tree is a simple numerical tree, with the numbers
containing either only "bare_option" or "value_option" and "value",
depending.  Example:

augtool> ls /files/etc/dpkg/dpkg.cfg
#comment[1] = dpkg configuration file
#comment[5] = Do not enable debsig-verify by default; since the distribution is not using
#comment[6] = embedded signatures, debsig-verify would reject all packages.
1/ = (none)
#comment[7] = Log status changes and actions to a file.
2/ = (none)
augtool> ls /files/etc/dpkg/dpkg.cfg/1
bare_option = no-debsig
augtool> ls /files/etc/dpkg/dpkg.cfg/2
value_option = log
value = /var/log/dpkg.log
augtool> set /files/etc/dpkg/dpkg.cfg/10000/bare_option test
augtool> set /files/etc/dpkg/dpkg.cfg/10001/value_option test2
augtool> set /files/etc/dpkg/dpkg.cfg/10001/value test3

*)

- -------------

-Robin




More information about the augeas-devel mailing list