Red Hat Bugzilla – Bug 1016183
Yum metadata files are automatically called XML files during publish
Last modified: 2014-08-09 02:56:49 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.
This has been fixed as part of the new yum distributor
Looks like this has been fixed. No productid.xml files created
This has been fixed in Pulp 2.4.0-1.