On Sun, 17 Feb 2013 22:25, Cristian Rodríguez
El 17/02/13 18:19, Karl Ove Hufthammer escribió:
I’m working on creating a package where the ‘build’ process seems to depend on being run under a UTF-8 locale. It turns out the the package when built on the OBS succeeds, but contains an invalid file, due to improper multibyte handling. I can get the same invalid file by doing a ‘LC_ALL=C make’ on my local system.
Is there a way to make OBS run under a UTF-8 locale, like ‘en_US.UTF-8’? What is the recommend way of handling problems like this?
What you want is to fix the root cause, not to make build run which utf8 locale.
Lets be VERY careful here and NOT trow stones, because we may be in a glasshouse. I'll give you an example: A file, with changeing encoding (e.g. UTF16be <-> UTF16le) has to be modified. In an unicode aware environment this works. In an ASCII 7bit (LANG=C) it will crash. Upstream says: Use unicode aware environment or die. Root cause is the NON-unicode aware build environment. Been there, done that, got no shirt. Chiniese is FUN, not. @Karl: To patch the Makefile to export the LANG=xx.UTF-8 you need, is a not nice way, but it may be helpful to start the fix. Isolate what file comes out invalid, what is done to create this file, and maybe what singluar command causes the change from valid to invalid. Then try to prefix just that command from <cmd> to LANG=xx.UTF-8 <cmd>. Try to contact upstream about the trouble, if upstream is NOT helful, make note about that in the changelog and the spec file. -- Yamaban.