Masahiro Yamada df6f0987e5 nsdeps: make generated patches independent of locale
scripts/nsdeps automatically generates a patch to add MODULE_IMPORT_NS
tags, and what is nicer, it sorts the lines alphabetically with the
'sort' command. However, the output from the 'sort' command depends on
locale.

For example, I got this:

$ { echo usbstorage; echo usb_storage; } | LANG=en_US.UTF-8 sort
usbstorage
usb_storage
$ { echo usbstorage; echo usb_storage; } | LANG=C sort
usb_storage
usbstorage

So, this means people might potentially send different patches.

This kind of issue was reported in the past, for example,
commit f55f2328bb28 ("kbuild: make sorting initramfs contents
independent of locale").

Adding 'LANG=C' is a conventional way of fixing when a deterministic
result is desirable.

I added 'LANG=C' very close to the 'sort' command since changing
locale affects the language of error messages etc. We should respect
users' choice as much as possible.

Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
2019-10-07 18:25:29 +02:00
..
2019-07-11 18:35:30 -07:00
2019-09-25 17:51:40 -07:00
2017-03-28 16:16:52 +02:00
2019-08-12 15:00:37 -06:00
2019-09-20 08:36:47 -07:00
2017-11-14 18:25:40 -08:00
2019-09-22 10:34:46 -07:00
2019-05-06 11:12:09 -07:00
2014-08-20 16:03:45 +02:00