updateinfo.xml is published with "unknown checksum" type if it's not present in a remote repo
Sync/publish https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/ to reproduce.
<update from="email@example.com" status="stable" type="enhancement" version="1"> <id>RHEA-2012:0058</id> <title>Gorilla_Erratum</title> <issued date="2013-01-27 16:08:09"/> <updated date="2014-07-20 06:00:01"/> <rights></rights> <summary></summary> <description>Gorilla_Erratum</description> <references/> <pkglist> <collection short=""> <name>1</name> <package name="gorilla" version="0.62" release="1" epoch="0" arch="noarch" src="http://www.fedoraproject.org"> <filename>gorilla-0.62-1.noarch.rpm</filename> <sum type="Unknown checksum"></sum> <------------------------------------ HERE </package> </collection> </pkglist> </update>
#3 Updated by daviddavis almost 3 years ago
Even if we don't set
sum_type on the
UpdateCollectionPackage, we still end up with the "Unknown checksum" values on checksums. The only way to hide this string is if we don't show the checksum at all if there's no checksum type.
Two possible solutions:
1. Only set the checksum if BOTH checksum and checksum_type are defined (ie not blank)
2. Only set checksum if checksum is defined (but this will still potentially cause "Unknown checksum" values)
I'm leaning towards option 2. If checksum is defined, then checksum_type should be also defined.
#8 Updated by ragbalak over 2 years ago
I am trying to include a test for this issue in pulp_rpm
I have a few clarifications concerning this
1) The UpdateInfo.xml of https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/ doesn't have checksum tag in it currently.
2) After publishing, I opened the UpdateInfo.xml under /var/lib/pulp/published/metadata
I saw that the updateinfo.xml of the published folder also doesn't have the checksum flag. Also does the folder name under metadata
"b58d8b65-3ff4-48fa-bf97-2e699daf9769" on the above path refer to something. Earlier in pulp-2 this used to be the distributor ID, whereas here the folder name doesn't match anything.
3) Also here all the metadata are present in different directories
$ tree metadata/ metadata/ ├── 0826ec34-1f36-428b-9cf7-faff7c2ec21b │ └── primary.xml.gz ├── 0cb92302-210d-46a8-91ea-1f9aeb473db6 │ └── primary.sqlite ├── 6cbd6d76-7d4f-49e5-8c42-6aecf8d18dfa │ └── repomd.xml ├── 726f1c40-be05-496e-837c-05c8e5974fa6 │ └── filelists.sqlite ├── 76dab473-4831-47e4-994b-0eaae20894b7 │ └── other.xml.gz ├── b58d8b65-3ff4-48fa-bf97-2e699daf9769 │ └── updateinfo.xml.gz ├── e63927f5-2886-421b-bb02-cc9c55a32e21 │ └── filelists.xml.gz └── ec88e722-c0dd-443c-93c8-05da76d8400c └── other.sqlite
Is this a how it was designed to be ?
#9 Updated by daviddavis over 2 years ago
The UpdateInfo.xml of https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/ doesn't have checksum tag in it currently.
That's fine. I don't think it's required. This bug was to remove the erroneous "Unknown checksum" elements. The lack of a checksum tag matches https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/.
After publishing, I opened the UpdateInfo.xml under /var/lib/pulp/published/metadata
I wouldn't recommend accessing the Updateinfo.xml file this way. You should distribute the repository publication and access it via http (ie by fetching
http://<distribution path>/repodata/updateinfo.xml). What you're seeing is how the file is stored internally on the filesystem in Pulp 3. You could have the same file served by multiple distributions at different URLs. In Pulp 2 we created symlinks to serve a file at multiple URLs but in Pulp 3 we dynamically resolve URLs to filesystem paths.
Also here all the metadata are present in different directories
Yea, see the previous answer.
Hope that helps. Let me know if anything is unclear.
Please register to edit this issue