What i understood from trails is that yum downloads a metalink XML file using the url specified in the
mirrorlist tag and then this XML file (metalink) contains a list of mirrors.
Code:
<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Fri, 04 Dec 2009 21:16:17 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
<files>
<file name="repomd.xml">
<mm0:timestamp>1259815133</mm0:timestamp>
<size>4510</size>
<verification>
<hash type="md5">8916d9c34623d9f30ad0685241ccee62</hash>
........
........
<resources maxconnections="1">
<url protocol="http" type="http" location="IN" preference="100">http://mirror.cse.iitk.ac.in/fedora/updates/12/x86_64/repodata/repomd.xml</url>
<url protocol="ftp" type="ftp" location="IN" preference="100">ftp://mirror.cse.iitk.ac.in/fedora/updates/12/x86_64/repodata/repomd.xml</url>
<url protocol="ftp" type="ftp" location="IN" preference="99">ftp://fedora.glug-nith.org/linux/updates/12/x86_64/repodata/repomd.xml</url>
<url protocol="http" type="http" location="RU" preference="98">http://mirror.svk.su/fedora/linux/updates/12/x86_64/repodata/repomd.xml</url>
<url protocol="ftp" type="ftp" location="RU" preference="98">ftp://mirror.svk.su/fedora/linux/updates/12/x86_64/repodata/repomd.xml</url>
<url protocol="rsync" type="rsync" location="RU" preference="98">rsync://mirror.svk.su/fedora/linux/updates/12/x86_64/repodata/repomd.xml</url>
........
........
</resources>
</file>
</files>
</metalink>
What complicates things is that the mirrors' URL point towards retrieving a
repomd.xml file. When I looked into this file, I found that it contains a listing (in XML) pointing to locations from where i can download information about the files available from the server.
However, all this was done manually and to automate this sequence, I need to know how to expand the $releasever and $basearch variables in the .repo files. Do you know how I could automatically find this?
------------------------------
The reason I am going through all this headache is that certain files do not get downloaded directly. So what i do is create a tunnel using ssh to another server using the command
ssh -D 1234 server.com and download the individual packages through this tunnel.
Do you happen to know of any method to make yum download automatically through this tunnel without me having to interrupt for each non-downloadable file?