Bug 1016183 - Yum metadata files are automatically called XML files during publish
Yum metadata files are automatically called XML files during publish
Product: Pulp
Classification: Community
Component: rpm-support (Show other bugs)
Unspecified Unspecified
medium Severity unspecified
: ---
: 2.4.0
Assigned To: Mike McCune
Preethi Thomas
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-10-07 12:46 EDT by Jay Dobies
Modified: 2014-08-09 02:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-09 02:56:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jay Dobies 2013-10-07 12:46:12 EDT
I uploaded a file named "productid" as a yum metadata file. When publishing the repository, I noticed the following:

1. There is a file named "productid.xml" in the root of the published repository. This shouldn't be there.
2. There is a file named <checksum>-productid.xml in repodata. Not only was the file not uploaded with the .xml suffix, it's not an XML file at all.

This also happens in Katello use cases where a file is copied into a new repository and it is published. It is not related to the upload functionality.

The important part is that repomd.xml does refer to the product ID file correctly. "Correctly" in the sense that it points to the file with the .xml suffix. So yum continues to work; the data_type of the entry is the important part, the filename is simply a look up at that point. So nothing is broken per se, it's just very odd that .xml is automatically tacked on to the end of the file regardless.

The issue is in pulp_rpm.yum_plugin.metadata. Despite the package name, this is not only code that runs in the client-side yum plugin. The merge_custom_repodata method in there handles adding the repo metadata files to repomd.xml. Also, don't be confused by the comments in there that refer to checking the scratchpad for data. The file information is passed into the method; the conduits are not contacted at all.

In there is a line:
ftype_xml_path = os.path.join(self.repodir, "%s.xml" % ftype)

I'm not sure why the .xml suffix is hardcoded there, but the primary use case for this functionality (product ID certificates which are straight PEM format) already invalidates this as an assumption.
Comment 1 Jason Connor 2013-11-13 15:02:49 EST
This has been fixed as part of the new yum distributor
Comment 3 Jeff Ortel 2014-04-03 09:36:15 EDT
build: 2.4.0-0.7.beta
Comment 4 Preethi Thomas 2014-06-04 15:10:35 EDT
Looks like this has been fixed. No productid.xml files created
Comment 5 Randy Barlow 2014-08-09 02:56:49 EDT
This has been fixed in Pulp 2.4.0-1.

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