Bug 1836152

Summary: Please rebase to itstool-2.0.6
Product: Red Hat Enterprise Linux 8 Reporter: Pino Toscano <ptoscano>
Component: itstoolAssignee: Sundeep Anand <suanand>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: bbarve, eng-i18n-bugs, fidencio
Target Milestone: rcKeywords: Rebase
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:01:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pino Toscano 2020-05-15 09:20:33 UTC
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

Comment 15 errata-xmlrpc 2020-11-04 03:01:38 UTC
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