Bug 1290021 - xml_dump_primary_metadata() fails if created with sumtype being Unicode
xml_dump_primary_metadata() fails if created with sumtype being Unicode
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: createrepo (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-09 09:13 EST by Brian Bouterse
Modified: 2016-12-20 11:50 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 11:50:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian Bouterse 2015-12-09 09:13:48 EST
I am on F23 and I have the following RPMs installed.

createrepo_c-libs-0.9.1-1.fc23.x86_64
createrepo-0.10.3-3.fc21.noarch
createrepo_c-0.9.1-1.fc23.x86_64

In my Python application we have had the following code working for a long time:

from createrepo import yumbased
po = yumbased.CreateRepoPackage(ts, pkg_path, sumtype=sumtype)
po.xml_dump_primary_metadata()

sumtype has always been a str, but more recently our application is getting more Unicode support. When sumtype became a Unicode object I now receive the following traceback:

Traceback (most recent call last):
  File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 100, in upload
    handlers[type_id](repo, type_id, unit_key, metadata, file_path, conduit, config)
  File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 311, in _handle_package
    unit.repodata = rpm_parse.get_package_xml(file_path, sumtype=unit.checksumtype)
  File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/parse/rpm.py", line 40, in get_package_xml
    primary_xml_snippet = change_location_tag(po.xml_dump_primary_metadata(), pkg_path)
  File "/usr/lib/python2.7/site-packages/yum/packages.py", line 1342, in xml_dump_primary_metadata
    assert type(msg) is str
AssertionError

One solution would be to allow that argument to be unicode. A broader effort to test createrepo with unicode data would also be good.
Comment 1 Fedora End Of Life 2016-11-24 09:06:02 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Fedora End Of Life 2016-12-20 11:50:16 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.