Bug 1016183 - Yum metadata files are automatically called XML files during publish
Summary: Yum metadata files are automatically called XML files during publish
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: 2.4.0
Assignee: Mike McCune
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 16:46 UTC by Jay Dobies
Modified: 2014-08-09 06:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:56:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2013-10-07 16:46:12 UTC
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 20:02:49 UTC
This has been fixed as part of the new yum distributor

Comment 3 Jeff Ortel 2014-04-03 13:36:15 UTC
build: 2.4.0-0.7.beta

Comment 4 Preethi Thomas 2014-06-04 19:10:35 UTC
verified
pulp-server-2.4.0-0.19.beta.fc20.noarch
Looks like this has been fixed. No productid.xml files created

Comment 5 Randy Barlow 2014-08-09 06:56:49 UTC
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.