YUM repo fails with koji/mock when base URL is used

Recently I started playing around with Koji for package building.


Everything was set-up pretty fast... but the first attempts to build a build-root failed...


After some troubleshooting I found the cause...


If you use the repo-data as available on an installation ISO (served via a webserver) and use mergerepos the location of an RPM will look like:



<location xml:base="CentOS" href="pam-0.99.6.2-6.el5_5.2.x86_64.rpm"/>


The entry as available on the ISO is:



<location xml:base="media://1330913492.861127#1" href="CentOS/pam-0.99.6.2-6.el5_5.2.x86_64.rpm"/>

The way to workaround this issue, is be recreated the repodata using createrepo:



# createrepo -u http://172.16.3.240/repo/centos/5.8/base/x86_64/-o ${WEBSERVERPATH}/new-repo/ /media/cd/

And then the entry will look like:


<location xml:base="http://172.16.3.240/repo/centos/5.8/base/x86_64/CentOS" href="pam-0.99.6.2-6.el5_5.2.x86_64.rpm"/>


The bug can be found in bugzilla.