Red Hat Bugzilla – Bug 473994
Yum localpath parsing
Last modified: 2014-01-21 18:07:14 EST
Description of problem:
When using createrepo to create the repository metadata,
with the repodata directory located one level below the root directory '/',
and the name of the directory containing the repodata directory chosen
such that it
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Copy the Fedora 10 release DVD to the directory /dvd
2. cd to / and run createrepo --database --groupfile /dvd/repodata/Fedora-10-comps.xml /dvd
In the xml file primary.xml.gz, for example, look at the
href attribute in the location element of the dvd+rw-tools package element.
The location is reported as "Packages+rw-tools-7.1-1.fc10.x86_64.rpm".
The correct href attribute should be:
May I suggest changing line 1555 in packages.py to
relpath = self.localpath.replace(self._reldir, '', 1)
if you run:
createrepo --database --groupfile /dvd/repodata/Fedora-10-comps.xml /dvd/
does it then work?
What version of createrepo are you using?
I've tried both 0.9.5-5.fc10 and 0.9.6-3.fc10, both of which dtrt.
(In reply to comment #1)
> if you run:
> createrepo --database --groupfile /dvd/repodata/Fedora-10-comps.xml /dvd/
> does it then work?
Yes, if I add the trailing slash to the directory, it works.
(In reply to comment #2)
> What version of createrepo are you using?
> I've tried both 0.9.5-5.fc10 and 0.9.6-3.fc10, both of which dtrt.
I've tried multiple times and I can't make this happen on any version.
I'm going to close this worksforme, for now, please reopen if you know how I can make it happen.