Bug 965131 - [rfe] substituting $vars in mirrorlists
[rfe] substituting $vars in mirrorlists
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: librepo (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mlcoch
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 964584
  Show dependency treegraph
 
Reported: 2013-05-20 09:32 EDT by Ales Kozumplik
Modified: 2014-09-30 19:41 EDT (History)
3 users (show)

See Also:
Fixed In Version: libsolv-0.3.0-5.git228d412.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-30 21:36:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Kozumplik 2013-05-20 09:32:56 EDT
It looks besides substituting variables in mirrorlist URLS and baseurls, Yum is able do $basearch and $releasever substitutions in the mirrorlists itself, e.g when one downloads mirrorlist containing the following entries:

http://mirror.unl.edu/kde-redhat/fedora/$releasever/$basearch/stable
http://ftp.heanet.ie/pub/kde-redhat/fedora/$releasever/$basearch/stable
http://apt.kde-redhat.org/apt/kde-redhat/fedora/$releasever/$basearch/stable
http://kdeforge.unl.edu/apt/kde-redhat/fedora/$releasever/$basearch/stable
http://kdeforge2.unl.edu/kde-redhat/fedora/$releasever/$basearch/stable

It replaces all $releasever and $basearch with proper string before issuing a HTTP request to one of the mirrors.

Several approaches toward implementing this in librepo can be considers of which, I'd like to point out, a callback mechanism seems the least practical to me. Perhaps passing the handler list of substitutions beforehand?
Comment 1 Tomas Mlcoch 2013-05-23 09:43:54 EDT
Fixed in https://github.com/Tojaj/librepo/commit/a97530214cc39f1a63f51ca76baa9a8640d03bfb

Add option LRO_VARSUB.

Example of usage:

h = librepo.Handle()
h.varsub = [("releasever", "18"), ("basearch", "i386")]
Comment 2 Richard Hughes 2013-06-12 04:53:31 EDT
Looks good. Tomas, could you roll a new release with this functionality included into Fedora rawhide please. librepo isn't really usable without LRO_VARSUB unless you like butchering your .repo files with sed :).
Comment 3 Tomas Mlcoch 2013-06-12 07:59:45 EDT
Hi, new build is done (http://koji.fedoraproject.org/koji/buildinfo?buildID=426150).
Comment 4 Fedora Update System 2013-06-24 08:22:42 EDT
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/librepo-0.0.4-2.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,libsolv-0.3.0-5.git228d412.fc19
Comment 5 Fedora Update System 2013-06-24 14:49:45 EDT
Package libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libsolv-0.3.0-5.git228d412.fc19 librepo-0.0.4-2.fc19 hawkey-0.3.14-1.git78b3aa0.fc19 dnf-0.3.8-2.git85524ae.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11602/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-06-30 21:36:54 EDT
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.