Ask Your Question

how to extract fedora repo from repo files ?

asked 2018-05-21 20:38:56 -0500

thirtyminutestosignup gravatar image

updated 2018-05-31 05:32:31 -0500

FranciscoD_ gravatar image

Hi, I am writing a tool in python and I need to extract the fedora repo mirrors from the .repo's files.. For example: I have the following link in /etc/yum.repos.d/fedora.repo file: metalink=https://mirrors.fedoraprojec...
and for my f27 should be: and this download a metalink file with the following:

# repo=extras-source-5&arch=source
# repo=extras-source-6&arch=source
# repo=fedora-10&arch=i386
# repo=fedora-10&arch=ppc
# repo=fedora-10&arch=ppc64
# repo=fedora-10&arch=x86_64
# repo=fedora-11&arch=i386
# repo=fedora-11&arch=ppc
# repo=fedora-11&arch=ppc64
# repo=fedora-11&arch=x86_64
# repo=fedora-12&arch=i386

and now ? How can I have to repo ??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-22 06:45:07 -0500

villykruse gravatar image
edit flag offensive delete link more


Oh yes, I am sorry. Anyway now I have the xml file with something like the following:

    <url protocol="http" type="http" location="SE" preference="96" ></url>
    <url protocol="https" type="https" location="NL" preference="95" ></url>

I have downloaded the xml and it contain various hash sha256 with files... what's that ?

thirtyminutestosignup gravatar imagethirtyminutestosignup ( 2018-05-22 19:17:17 -0500 )edit

Select a mirror and follow the link

Select the parent of the parent directory

Start looking around

For the gory details, look at the source code for dnf and the supporting libraries.

villykruse gravatar imagevillykruse ( 2018-05-22 23:08:24 -0500 )edit

Question Tools

1 follower


Asked: 2018-05-21 20:38:56 -0500

Seen: 491 times

Last updated: May 22 '18