Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
The version shipped in RHEL 8 is 2.0.4, and because of the Python 3 switch it uses Python 3 instead of Python 2. The problem is that itstool 2.0.4 had a number of issues with Python 3, and those make itstool unusable in certain situations.
For example:
$ git clone https://github.com/itstool/itstool git
$ cd git
git$ mkdir tmp
git$ itstool -n -o tmp/test.pot tests/LocaleFilter/Locale1Xml.xml
git$ stat --format '%s' tmp/test.pot
0
Bug #1 I ran into.
git$ itstool -n tests/LocaleFilter/Locale1Xml.xml > tmp/test.pot
Workaround for issue #1 above.
git$ stat --format '%s' tmp/test.pot
697
git$ msgfmt -o tmp/fr_FR.mo tests/LocaleFilter/Locale1Xml.fr_FR.po
git$ itstool -n -o tmp/test.xml -j tests/LocaleFilter/Locale1Xml.xml tmp/*.mo
Error: Could not merge translations:
'NoneType' object has no attribute 'split'
Bug #2 I ran into.
git$ stat --format '%s' tmp/test.xml
0
And there are more about this, e.g. with the -o option in various modes [2]. I hit issue #1 when trying to use itstool in another project, osinfo-db [3].
Looking at the log of the upstream repository between 2.0.4 and 2.0.6 shows that basically almost all the fixes are related to Python 2 vs 3 compatibility, and still there are open issues [1] about that.
This is why I'm asking for a rebase instead of reporting the issues: backporting all the Python 3 fixes would be more work than simply rebase to the latest upstream release (2.0.6); also, the current fix-segfaults.patch patch can be dropped.
[1] https://github.com/itstool/itstool/issues/35
[3] https://github.com/itstool/itstool/issues/28
[2] https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/133
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (itstool bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:4688