RTEMS Source Builder | Can't build everything with all locales (#32)

Christian Mauderer (@c-mauderer) gitlab at rtems.org
Sat Sep 7 14:16:45 UTC 2024



Christian Mauderer created an issue: https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/32

Assignee: Christian Mauderer

## 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:

https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/blob/8488d28da6bfa233a90c2e80898696fd8de15534/source-builder/sb/git.py#L241

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?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/32
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240907/8080107d/attachment.htm>


More information about the bugs mailing list