Discussion:
createrepo layout bug ?
Pierre Wieser
2011-11-28 16:49:16 UTC
Permalink
Sorry, if it happens to be a double post, but it happens like
the moderator has forgotten me...

----- Mail transféré -----
De: "Pierre Wieser" <***@trychlos.org>
À: rpm-***@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
list.

I would have a yum layout as:
my_repo/
+- 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 @@

try:
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))

Regards,
Pierre
Pierre Wieser
2011-11-13 08:30:00 UTC
Permalink
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
list.

I would have a yum layout as:
my_repo/
+- 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 @@

try:
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))

Regards,
Pierre
James Antill
2011-11-29 20:14:05 UTC
Permalink
Post by Pierre Wieser
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
list.
my_repo/
+- RPMS/
+- repodata/
[pierre my_repo]$ createrepo -o . RPMS
Just run:

createrepo .

...what you are telling it to do is act like the repo. is RPMS/repodata
but to actually store it somewhere else. This can be useful when
creating a repo. from data where you don't have write permission.
Pierre Wieser
2011-12-02 22:12:34 UTC
Permalink
----- Original Message -----
Post by James Antill
Post by Pierre Wieser
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
list.
my_repo/
+- RPMS/
+- repodata/
[pierre my_repo]$ createrepo -o . RPMS
createrepo .
...what you are telling it to do is act like the repo. is
RPMS/repodata
but to actually store it somewhere else. This can be useful when
creating a repo. from data where you don't have write permission.
Well, it works! Amazing!

I really didn't understood the command line.
Thanks for your help.

Regards
Pierre

Loading...