Re: Using yum for repo that was created with createrepo

Maria Alandes Pradillo <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
Hi James,


> I think you'd need to have two repos, like:
>
>
>[repo1]
>name=my repo list1
>baseurl=http://whatever/dir1
>
>[repo2]
>name=my repo list2
>baseurl=http://whatever/dir2
>
>...and if you need to have it on the FS in that way I think you need
>to use: --baseurl http://whatever/main_dir

Thanks a lot for your mail. This has helped me to progress a bit more but I'm still experiencing some problems. Now I create my repos like:

createrepo -i list1 -o dir1 --baseurl=http://main_dir main_dir
createrepo -i list2 -o dir2 --baseurl=http://main_dir main_dir

And the repo files are as you suggested. Even if in the repomd.xml file there's explicit information about my baseurl:

> more dir1/repodata/repomd.xml
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo">
  <data type="other">
    <location xml:base="http://main_dir" href="repodata/other.xml.gz"/>
...


Yum fails to find the packages because it still tries to get them from the dir1 or dir2 locations instead of from main_dir. I fear that the yum client is
not able to understand the xml:base information. I've also thought of using the --installroot option when running yum, but it's not a good idea since it uses
it for all the repos I define under /etc/yum.repos.d and I only want to use it for dir1 and dir2 repos. I've also tried to define the repos as:


[repo1]
name=my repo list1
baseurl=http://whatever/dir1
installroot=http://main_dir

[repo2]
name=my repo list2
baseurl=http://whatever/dir2
installroot=http://main_dir

But it doesn't work either so probably it's a wrong syntax.

I can't find much more information about the --baseurl option of createrepo. In the man page of createrepo it says:

--baseurl <url>
              Optional base url location for all files. (not used by any clients at this time)

Maybe yum is not able to use this option (?)

Thanks a lot,
Maria
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.