Ask Your Question
0

how to extract fedora repo from repo files ?

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

thirtyminutestosignup gravatar image

updated 2018-05-31 05:32:31 -0600

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: https://mirrors.fedoraproject.org/met... 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
1

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

villykruse gravatar image
edit flag offensive delete link more

Comments

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" >http://ftp.acc.umu.se/mirror/fedora/linux/releases/27/Everything/x86_64/os/repodata/repomd.xml</url>
    <url protocol="https" type="https" location="NL" preference="95" >https://ams.edge.kernel.org/fedora-buffet/fedora/linux/releases/27/Everything/x86_64/os/repodata/repomd.xml</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 -0600 )edit

Select a mirror and follow the link

http://ftp.acc.umu.se/mirror/fedora/linux/releases/27/Everything/x86_64/os/repodata/repomd.xml

Select the parent of the parent directory

http://ftp.acc.umu.se/mirror/fedora/linux/releases/27/Everything/x86_64/os/

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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 476 times

Last updated: May 22 '18