Can't build everything with all locales
Summary
I wanted to build the qemu-xilinx
on an Archlinux System with a German language setting. With that, downloading the sources for qemu-xilinx-v2023.2-1 failed. It seems that the source-builder/sb/git.py
module tries to parse some language specific strings. My problem is at that line:
With a LANG='C' or LANG='en_US' setting, the output of git remote show origin
has a line
HEAD branch: main
that is parsed by that module. With a LANG='de_DE', I instead get a
Hauptbranch: main
With that output, no default branch can be found and the source builder crashes at source-builder/sb/download.py
in line 511:
repo.checkout(default_branch)
I'm not sure whether that's the only place where a language specific string is parsed.
Steps to reproduce
On a system with a German locale, try
../source-builder/sb-set-builder
--source-only-download
devel/qemu-xilinx
Possible solutions
I can think of multiple solutions:
- Setting the locale to 'C' for all RSB applications using the python
locale.setlocale(...)
. Problem is: I'm not sure whether that works on Windows. I didn't find any clear cross-platform solution. - Replacing the current git.py with the python git module. Most likely difficult due to dependencies.
- Handle strings of all languages.
Any better ideas?