patchman
patchman copied to clipboard
CloudFlare repository throwing error on patchman -r
Hey!
I manage a series of servers that use CloudFlare's repository for some packages and I can't seem to refresh that repo, for some reason.
Here is the output of patchman -lr
:
22 : CloudFlare Packages x86_64
security: False arch: x86_64
Mirrors:
56 : http://pkg.cloudflare.com/dists/7/main/binary-x86_64
last updated: 2019-01-29 15:40:21.337702 checksum: None
And the error stack:
Repository 22 : CloudFlare Packages x86_64
Checking http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml.xz
Checking http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml.bz2
Checking http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml.gz
Checking http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml
Found yum rpm repo - http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml
Traceback (most recent call last):
File "/usr/bin/patchman", line 593, in <module>
main()
File "/usr/bin/patchman", line 588, in main
showhelp = process_args(args)
File "/usr/bin/patchman", line 561, in process_args
refresh_repos(args.repo, args.force)
File "/usr/bin/patchman", line 120, in refresh_repos
repo.refresh(force)
File "/usr/lib/python2.7/site-packages/patchman/repos/models.py", line 88, in refresh
refresh_rpm_repo(self)
File "/usr/lib/python2.7/site-packages/patchman/repos/utils.py", line 552, in refresh_rpm_repo
refresh_yum_repo(mirror, data, mirror_url, ts)
File "/usr/lib/python2.7/site-packages/patchman/repos/utils.py", line 417, in refresh_yum_repo
primary_url, checksum, checksum_type = get_primary_url(mirror_url, data)
File "/usr/lib/python2.7/site-packages/patchman/repos/utils.py", line 147, in get_primary_url
namespaces={'ns': ns})[0]
IndexError: list index out of range
What could be the issue? Thanks!
It looks like that repo is using the incorrect XML namespace:
http://linux.duke.edu/metadata/repomd
instead of http://linux.duke.edu/metadata/repo
Not sure how Cloudflare are generating these repos, but I think it may be custom code, as I can't find any other repo using the XML namespace ending in repomd
.
Opened an issue with Cloudflare. They have confirmed the issue and they will issue a fix in the future:
Hi Marcus,
We're now aware of the bug and have it on our roadmap to fix.
Unfortunately, I don't have a date when the change will be released, but we do plan to do it.