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

Dominique Dumont domi.dumont at free.fr
Wed Jan 14 18:04:25 UTC 2009


David Lutterkort <lutter at redhat.com> writes:

>> 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.
>
> At first, that was my suspicion, too, but the regular expressions that
> are used for matching are identical, and I can see in the debugger that
> the regex matcher produces different results.

I'm not sure that I follow you.

IMHO, the suspect lens is 

   let key_re = /[A-Za-z0-9]+/
         - /MACs|Match|AcceptEnv|Subsystem|(Allow|Deny)(Groups|Users)/

The regex before and after the '-' are not identical ?? [ puzzled ]

So, what do you mean by "the regular expressions that are used for
matching are identical" ?

On my side, I've tinkered a lot the regex on the right side and never
managed to have an effect. Even

  let key_re = /[A-Za-z0-9]+/ - "Match" 

does not work. Hence the suspicion regarding the '-' (which will leas
to a call to qsort BTW). [ ok I may be wrong ]

>> Weird, the LANG change has no effect on my Rhel5 machine.
>
> Do you have any LC_ variables set ?

LC_COLLATE did not make any difference (C or posix). I'll check again
tomorrow.

>> 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.
>
> Yeah, I suspect that that's what causes the differences.

And sort is called (indirectly) by fa_minus

>> > 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. 
>
> What have you tried to reproduce this on 32bit ? And with what LC_*/LANG
> vars ?

Yes. 32 bits has *always* worked whatever LC_*/LANG I set (by default,
LANG is en_US with utf8). I can provide a more detailed report if you
want.

All the best




More information about the augeas-devel mailing list