Re: Recursing on repos

James Antill <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
pirla <[email protected]> writes:

> Il giorno mar, 03/02/2009 alle 19.41 -0500, James Antill ha scritto:
>> pirla <[email protected]> writes:
>>  Here is how I'd probably do it:
>> 
>> import yum, os, sys
>> yb = yum.YumBase()
>> yb.repos.setCacheDir(yum.misc.getCacheDir())
>> 
>> for repo in yb.repos.enableRepo('*'):
>>     for pkg in yb.pkgSack.returnPackages(repoid=repo):
>>         print pkg.name, pkg.ver, pkg.rel, pkg.arch, pkg.repo
>>     yb.pkgSack.dropCachedData()
>
> It also do not work.
> The error is the same:
> yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml)
> for repository: kwizart-rawhide-debuginfo. Please verify its path and
> try again

 It works fine, the repo. you have given it is not valid and doesn't
have a valid cached state ... so yum fails.
 If you need to work around this you'll probably need to do a bunch of
complicated stuff, yum doesn't have a concept of "maybe repos".

> I checked for repo definition on 
>
> [kwizart-rawhide-debuginfo]
> name=kwizart for Fedora Rawhide - $basearch - Debug
> baseurl=http://rpms.kwizart.net/fedora/rawhide/$basearch/debug/
[...]
> and the url is available, but empty.

 empty == no repodata == not a valid repo.

-- 
James Antill -- [email protected]
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.