[Rpm-metadata] createrepo layout bug ?

Pierre Wieser pwieser at trychlos.org
Mon Nov 28 16:49:16 UTC 2011

Sorry, if it happens to be a double post, but it happens like
the moderator has forgotten me...

----- Mail transféré -----
De: "Pierre Wieser" <pwieser at trychlos.org>
À: rpm-metadata at lists.baseurl.org
Envoyé: Dimanche 13 Novembre 2011 09:30:00
Objet: createrepo layout bug ?

Hi all,

I have searched in the mailing-list archives (and much google'd)
without finding any suitable pointer on my issue. So I ask this

I would have a yum layout as:
    +- RPMS/
    +- repodata/

So, I do:
    [pierre my_repo]$ createrepo -o . RPMS

This works almost fine, taking the RPMs from the RPMS/ subdirectory,
creating the repo files in repodata/ subdirectory. Except that
the location href tag in primary.xml does not embed the RPMS/ level
itself. I get:
    <location href="my_package.rpm"/>
instead of:
    <location href="RPMS/my_package.rpm"/>

I would consider this as a bug, as the /etc/yum.repos.d/my_repo.repo
file must address the my_repo/ directory, where Yum wants find a
repodata/ subdir. So, obviously, the href property should embed the
RPMS/ level.

Do you consider this as a bug or is there just something I'm missing ?
I am new with createrepo. I use createrepo 0.9.8 in CentOS6.
Below is a patch I may propose to get ride of this:

--- /usr/lib/python2.6/site-packages/createrepo/__init__.py.orig	2011-11-12 19:09:59.620327132 +0100
+++ /usr/lib/python2.6/site-packages/createrepo/__init__.py	2011-11-12 19:10:42.930273556 +0100
@@ -517,7 +517,7 @@
                         po = self.read_in_package(pkg, pkgpath=pkgpath, 
-                                                  reldir=reldir)
+                                                  reldir=self.conf.basedir)
                     except MDError, e:
                         # need to say something here
                         self.callback.errorlog("\nError %s: %s\n" % (pkg, e))


More information about the Rpm-metadata mailing list