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

Dominique Dumont dominique.dumont at hp.com
Wed Jan 14 14:03:03 UTC 2009


David Lutterkort <lutter at redhat.com> writes:

> 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.

Actually, after much tinkering with sshd lens, I have the gut feeling
that the problem is in the key_re lens. Looks like the '-' operator
between the 2 regex is not working properly.

> 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.

Weird, the LANG change has no effect on my Rhel5 machine.

But it has an effect on my Debian machine... [scratching my head]

In fact, I can get correct results with setting only the LC_COLLATE
variable. According to the doc this variable changes the way character
sorts are done.

> 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.

Yes, and there's still the fact that the problem cannot be reproduced
(so far) on a 32 bits arch. 

HTH

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner

irc:
  domidumont at irc.freenode.net
  ddumont at irc.debian.org




More information about the augeas-devel mailing list