[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#711759: flash-kernel: FTBFS in test_db due to sorting vs. locale issues



Loïc Minier <loic.minier@dooz.org> (10/06/2013):
> On Sun, Jun 09, 2013, Cyril Brulebois wrote:
> > I think I'll work around it by exporting LC_ALL=C for wheezy (which is
> > affected by a similar issue with the tagged-but-not-uploaded 3.3+deb7u1),
> > at least until a proper fix lands in master. Fetching more changes from
> > master, including the Bootloader-Sets-Root case change, looks way too
> > intrusive for wheezy, and it isn't sufficient anyway.

(JFTR: not going to use LC_ALL=C after all, opting for a real fix, see
below.)

> Yeah, I ran into this when preparing the 3.7 upload, but catched it in
> sbuild; I fixed this in 67e61b9cfa883d3b6ec234c773de1e0b01e48476 by
> ignoring the case when sorting (and updating the order of fields in the
> test), isn't that enough in the backport?

No, it isn't. As I wrote, that isn't fixed in master (3.7), why would
backporting that bit help the backport?

The problem is that sorting isn't just about the case, so using the -f
option isn't sufficient. See LC_COLLATE[1], I guess.

 1. http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html

Reproducer:
| $ printf 'Bootl\nBoot-M\n'|LANG=en_GB.UTF-8 sort -u -f
| Bootl
| Boot-M
| $ printf 'Bootl\nBoot-M\n'|LANG=fr_FR.UTF-8 sort -u -f
| Boot-M
| Bootl

(LANG can be replaced with LC_COLLATE, same output.)

I think we want to forget about "-f", and use the same sort call for
both the $expected and $fields variables. Both lists will then get the
same sorting algorithm, whatever the locale is, and we can forget
about having to sort the list of expected field in this or that
hardcoded way.

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature


Reply to: