Re: createrepo w/centos distribution

seth vidal <[email protected]>
Newsgroups gmane.linux.rpm.metadata
Message-ID <1216304054.3211.6.camel@rosebud>
On Thu, 2008-07-17 at 13:06 +0100, Henry Kemp wrote:
> I'm having difficulties using createrepo (v.0.4.3) to re-create the
> repodata for a local copy of a CentOS 5.x repository. The directory
> layout is as follows:
> 
>     |-- CentOS
>     |   |-- Cluster_Administration-as-IN-5.2-1.el5.centos.noarch.rpm
>     |   |-- Cluster_Administration-bn-IN-5.2-1.el5.centos.noarch.rpm
>     |   |-- Cluster_Administration-de-DE-5.2-1.el5.centos.noarch.rpm
>     |   |-- Cluster_Administration-en-US-5.2-1.el5.centos.noarch.rpm
>     [...snipped...]
>     |-- images
>     |   `-- stage2.img
>     `-- repodata
>         |-- filelists.xml.gz
>         |-- other.xml.gz
>         |-- primary.xml.gz
>         `-- repomd.xml
> 
>     3 directories, 3232 files
> 
> It looks as though createrepo wants to create the repodata in the same
> directory as the RPMs (so in this  case CentOS/repodata) so I've
> specified the output directory and that writes the repodata files to the
> correct place but the location of the RPMs in primary.xml is wrong (eg.
> location href="db4-tcl-4.3.29-9.fc6.x86_64.rpm" when it should be
> location href="CentOS/db4-tcl-4.3.29-9.fc6.x86_64.rpm"). The command
> I've been using is "createrepo -p -o . -u CentOS CentOS".
> 
> Any advice would be gratefully appreciated!
> 

Don't specify an outputdir unless you need to:

just run:
createrepo -p /path/to/CentOS

that will make the repodata dir inside the CentOS dir.

-sv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.