[augeas-devel] Weird print result with Perl bindings on amd64

David Lutterkort lutter at redhat.com
Tue Jan 13 19:49:42 UTC 2009


On Tue, 2009-01-13 at 14:16 +0100, Dominique Dumont wrote:
> David Lutterkort <lutter at redhat.com> writes:
> 
> > Isn't the output for the perl example what a previous incarnation of the
> > sshd lens produced ? 
> >
> > Are you absolutely sure you don't have AUGEAS_LENS_LIB set on your amd64
> > box or an old lens in the default lens dir ? Might be worth stracing the
> > perl command to see where it gets the sshd.aug lens from and
> > double-checking that that's the version from 0.3.5.
> 
> Some more news on this topic
> 
> I've reproduced this problem on Rhel5 x86_64, with perl 5.8. So it's
> not Debian specific or perl 5.10 specific.

I can also reproduce that on my F10 box; and after much poking around
and staring at regexps, I verified that the C and perl versions use the
exact same regexps internally, but split the input differently - augtool
correctly notices that the first * in 'lns' is not matched with your
small example, but the second is. Running under perl, the first '*' is
matched, and trouble ensues.

It seems it's a locale problem - if I run the perl test with LANG=C in
the environment, it produces the same result as the Perl version, but if
I run with LANG=en_US, I get the results you described.

It's not clear to me what causes the different behaviors; it seems Perl
is doing something with locale setup beyond what glibc does, otherwise
augtool should produce the same strange result with LANG=en_US, but it
doesn't.

David





More information about the augeas-devel mailing list