Hi all,

I'm trying to work with augeas to add pinnings to my /etc/apt/
preferences file. But I'm not getting my head around it. If I do the
simplest I can think of:

        augeas { "Apt/preferences pinnings for augeas-lenses.":
                context => "/files/etc/apt/preferences",
                changes => ["set 00/Explanation 'We need these from 
backports.'",
                            "set 00/Package augeas-lenses",
                            "set 00/Pin release",
                            "set 00/Pin/a lenny-backports",
                            "set 00/Pin-Priority 999"],
        }

it adds the definition to the bottom of the file each time. If I
change the context into

        context => "match /files/etc/apt/preferences/*/Package augeas-
lenses",

it only works if there's already an augeas-lenses definition
available. In which "working" is a large word, because if the current
Pin-Priority is 900, it doesn't set it to 999. If there's no augeas-
lenses definition available, it *segfaults*:

/usr/lib/ruby/1.8/augeas.rb:48: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

Aborted

So I'm at a bit of a loss. What am I doing wrong and how should I be
handling these kind of situations?

For reference, I'm using augeas stuff from lenny-backports:
augeas-lenses                 0.7.0-1~bpo50+1
augeas-tools                  0.7.0-1~bpo50+1
libaugeas-ruby1.8             0.3.0-1~bpo50+1
libaugeas0                    0.7.0-1~bpo50+1

--
Kind regards,
Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to