Bug 1411349

Summary: dnf makes wrong assumptions about metalinks
Product: [Fedora] Fedora Reporter: Daniel Mach <dmach>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: jmracek, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-10 16:00:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 578256    

Description Daniel Mach 2017-01-09 14:33:51 UTC
When repo config contains:
metalink=...
but there's no 'metalink' string in the URL,
dnf/librepo considers the metalink address a mirrorlist and fails on unknown URL:

error: Curl error (6): Couldn't resolve host name for http://<metalink xmlns:mm0="http://fedorahosted.org/mirrormanager" xmlns="http://www.metalinker.org/" version="3.0" generator="mirrormanager" type="dynamic" pubdate="Mon, 09 Jan 2017 14:22:50 GMT">/repodata/repomd.xml [Could not resolve host: <metalink xmlns:mm0="http] (http://<metalink xmlns:mm0="http://fedorahosted.org/mirrormanager" xmlns="http://www.metalinker.org/" version="3.0" generator="mirrormanager" type="dynamic" pubdate="Mon, 09 Jan 2017 14:22:50 GMT">/repodata/repomd.xml).

This is probably caused by using an obsolete librepo feature:
http://rpm-software-management.github.io/librepo/lib.html#librepo.LRO_MIRRORLIST

Could you replace it with LRO_MIRRORLISTURL and LRO_METALINKURL?

Comment 1 Daniel Mach 2017-01-09 14:52:52 UTC
Clarification on why to fix this issue:
1) migrate dnf from deprecated to supported librepo features
2) support dynamically generated metalinks (I'm working on something like a mirror manager for composes) that have no 'metalink' in URL

Comment 3 Jaroslav Mracek 2017-02-10 16:00:00 UTC
Bugs fixed in version of dnf-2.0.1-1.