Actions
Issue #890
closeduploaded puppet module gets wrong metadata
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.6.0
Platform Release:
2.6.2
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Reproducer steps:
0) Perform a fresh install EL6
1) download the file:
wget https://forgeapi.puppetlabs.com/v3/files/deric-accounts-1.1.2.tar.gz
2) Rename the deric-accounts-1.1.2.tar.gz file to be foo-bar-1.1.2.tar.gz
cp deric-accounts-1.1.2.tar.gz foo-bar-1.1.2.tar.gz
3) create an empty puppet repo:
pulp-admin -u admin -p admin puppet repo create --repo-id zoo-puppet
4) upload the puppet module using the new name.
pulp-admin -u admin -p admin puppet repo uploads upload --file ./foo-bar-1.1.2.tar.gz --repo-id zoo-puppet
4) list the metadata of the modules:
[bmbouter@server pulp]$ pulp-admin -u admin -p admin puppet repo modules --repo-id zoo-puppet
5) You will see the name is 'stdlib', but the expected name is 'accounts' Also the author will be 'puppetlabs', but the expected author is 'deric'.
Actions
Updates metadata.json search to look in first top-level folder
The implementation was using a depth-first-search which did not traverse in the same order on all platforms. Some Puppet modules contain other modules as dependencies, and the DFS implementation could incorrectly find the wrong one. This uses a very dumb approach which looks for metadata.json in the top level folder of the the tar.gz uploaded Puppet module. This is based on the Puppet packaging guidelines 0.
https://pulp.plan.io/issues/890 closes #890