[packagekit] working with yum (without a cache)

Tim Lauridsen tla at rasmil.dk
Fri Oct 19 01:35:30 PDT 2007


Richard Hughes wrote:
> [root at hughsie-laptop ~]# yum clean all
> Loading "downloadonly" plugin
> Cleaning up Everything
> [root at hughsie-laptop
> ~]# /usr/share/PackageKit/helpers/yum/search-details.py "none" "power"
> allow-interrupt true
> no-percentage-updates
> Traceback (most recent call last):
>   File "/usr/share/PackageKit/helpers/yum/search-details.py", line 21,
> in <module>
>     backend.search_details(options,searchterms)
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 189, in
> search_details
>     self._do_search(searchlist, filters, key)
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 119, in
> _do_search
>     for (pkg,values) in res:
>   File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 1295, in
> searchGenerator
>     for sack in self.pkgSack.sacks.values():
>   File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 526, in
> <lambda>
>     pkgSack = property(fget=lambda self: self._getSacks(),
>   File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 381, in
> _getSacks
>     self.repos.populateSack(which=repos)
>   File "/usr/lib/python2.5/site-packages/yum/repos.py", line 242, in
> populateSack
>     sack.populate(repo, mdtype, callback, cacheonly)
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 142, in
> populate
>     if self._check_db_version(repo, mydbtype):
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 199, in
> _check_db_version
>     if repo.repoXML.repoData.has_key(mdtype):
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 769, in
> <lambda>
>     repoXML = property(fget=lambda self: self._getRepoXML(),
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 765, in
> _getRepoXML
>     raise Errors.RepoError, msg
> yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml)
> for repository: development. Please verify its path and try again
>
> Can we please send an error "PK_ERROR_ENUM_NO_CACHE" or something
> please. Yell if you need a hand adding error enums.
>
> Thanks.
>
> Richard.
>
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>   
I have added a ERROR_NO_CACHE = 'no-cache' to python backend base and 
made the yum backend signal a
error ERROR_NO_CACHE, if a repo error is raised by yum in the search-* 
helpers.

Tim



More information about the PackageKit mailing list