-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dnf5-5.1.11 FTBFS in openSUSE due to msgmerge failure #1158
dnf5-5.1.11 FTBFS in openSUSE due to msgmerge failure #1158
Comments
I confirm that libdnf5-cli/po/sv.po file is invalid since:
The broken file contains duplicate messages at the end. |
This broken file is copied from https://github.com/rpm-software-management/dnf5-l10n repository and there the libdnf5-cli/sv.po file was broken with:
Commits into dnf5-l10n repository are performed by https://translate.fedoraproject.org/projects/dnf5/libdnf5-cli/sv/ web service. It seems that the service can produce files invalid from GNU gettext msgmerge point of view and we blindly accept all files. |
Something somewhere should run |
Probably should be done for all locales so we don't hit this elsewhere. |
I uploaded a new file to the web service without any effect. Then I tried pushing to dnf5-cli repository, but I don't have the permissions. @m-blaha, you are admin on Weblate. Can you fix it? We need this fix rpm-software-management/dnf5-l10n#1. |
I think the problem is here: dnf5/libdnf5-cli/exception.cpp Line 49 in 9111440
This adds an empty string to the translation template, which probably conflicts with empty string automatically added by xgettext. |
Indeed. |
An empty string has a special meaning in gettext and marking such string produces invalid catalogs with a duplicate message ID entry. Fixes: rpm-software-management#1158
An empty string has a special meaning in gettext and marking such string produces invalid catalogs with a duplicate message ID entry. Fixes: rpm-software-management#1158
The duplicates breaks msgmerge on the broken catalogs in CI. This patch fixes them. Fixes: rpm-software-management#1158
An empty string has a special meaning in gettext and marking such string produces invalid catalogs with a duplicate message ID entry. We cannot use simply Error("") necause Error() expects BgettextMessage argument. Therefore I added EMPTY_MESSAGE macro which expands to the same as M_(""), but is not caught by xgettext. I think is cleaner solution then overriding xgettext behaviour for that line of code. Fixes: rpm-software-management#1158
The duplicates breaks msgmerge on the broken catalogs in CI. This patch fixes them. Fixes: rpm-software-management#1158
An empty string has a special meaning in gettext and marking such string produces invalid catalogs with a duplicate message ID entry. We cannot use simply Error("") necause Error() expects BgettextMessage argument. Therefore I added EMPTY_MESSAGE macro which expands to the same as M_(""), but is not caught by xgettext. I think it's cleaner solution than overriding xgettext behaviour for that line of code. For aesthetic reasons I also disabled clang-format at two places. Fixes: rpm-software-management#1158
The duplicates breaks msgmerge on the broken catalogs in CI. This patch fixes them. Fixes: rpm-software-management#1158
An empty string has a special meaning in gettext and marking such string produces invalid catalogs with a duplicate message ID entry. We cannot use simply Error("") necause Error() expects BgettextMessage argument. Therefore I added EMPTY_MESSAGE macro which expands to the same as M_(""), but is not caught by xgettext. I think it's cleaner solution than overriding xgettext behaviour for that line of code. For aesthetic reasons I also disabled clang-format at two places. Fixes: #1158
The duplicates breaks msgmerge on the broken catalogs in CI. This patch fixes them. Fixes: #1158
@Conan-Kudo, since you are building dnf5 in SUSE, would you like to have a new tarball or are you ok with patching downstream? I am patching dnf5 downstream, but I am also ok to rebase to a new release |
@inknos I would prefer a new release please. |
The old `ubuntu-22.04` uses version `swig4.0` which fails on C++11 attributes. We have started to use them in: rpm-software-management#1793 and the readthedocs build has been failing since then. Use `24.04` (https://about.readthedocs.com/blog/2024/06/ubuntu-24-04/) because it uses `swig_4.2.0` which atleast ignores the attributes. According to the changelog the attributes should be ingnored since version 4.1.0: https://www.swig.org/Release/CHANGES ``` 2022-07-07: jmarrec rpm-software-management#1158 #2286 Add basic support for C++11 attributes. These are now crudely ignored by SWIG's parser's tokeniser, which is better than failing with a parse error. ```
The old `ubuntu-22.04` uses version `swig4.0` which fails on C++11 attributes. We have started to use them in: rpm-software-management#1793 and the readthedocs build has been failing since then. Use `24.04` (https://about.readthedocs.com/blog/2024/06/ubuntu-24-04/) because it uses `swig_4.2.0` which at least ignores the attributes. According to the changelog the attributes should be ignored since version 4.1.0: https://www.swig.org/Release/CHANGES ``` 2022-07-07: jmarrec rpm-software-management#1158 #2286 Add basic support for C++11 attributes. These are now crudely ignored by SWIG's parser's tokeniser, which is better than failing with a parse error. ```
The old `ubuntu-22.04` uses version `swig4.0` which fails on C++11 attributes. We have started to use them in: #1793 and the readthedocs build has been failing since then. Use `24.04` (https://about.readthedocs.com/blog/2024/06/ubuntu-24-04/) because it uses `swig_4.2.0` which at least ignores the attributes. According to the changelog the attributes should be ignored since version 4.1.0: https://www.swig.org/Release/CHANGES ``` 2022-07-07: jmarrec #1158 #2286 Add basic support for C++11 attributes. These are now crudely ignored by SWIG's parser's tokeniser, which is better than failing with a parse error. ```
I tried to build dnf5-5.1.11, but it fails due to a msgmerge failure:
The text was updated successfully, but these errors were encountered: