[packagekit] Reviewing use of internal-error

Richard Hughes hughsient at gmail.com
Mon Mar 24 10:32:06 PDT 2008


Guys, we shouldn't be using internal-error at all:

Error Type: <class 'yum.Errors.RepoError'>
Error Value: Cannot retrieve repository metadata (repomd.xml) for repository: utopia. Please verify its path and try again
  File : /usr/share/PackageKit/helpers/yum/get-updates.py , line 19, in <module>
    backend.get_updates(filter)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py , line 1075, in get_updates
    self._refresh_yum_cache()
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py , line 1237, in _refresh_yum_cache
    self.yumbase.repos.populateSack(mdtype='metadata', cacheonly=1)
  File : /usr/lib/python2.5/site-packages/yum/repos.py , line 244, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File : /usr/lib/python2.5/site-packages/yum/yumRepo.py , line 149, in populate
    if self._check_db_version(repo, mydbtype):
  File : /usr/lib/python2.5/site-packages/yum/yumRepo.py , line 203, in _check_db_version
    return repo._check_db_version(mdtype)
  File : /usr/lib/python2.5/site-packages/yum/yumRepo.py , line 911, in _check_db_version
    repoXML = self.repoXML
  File : /usr/lib/python2.5/site-packages/yum/yumRepo.py , line 1057, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File : /usr/lib/python2.5/site-packages/yum/yumRepo.py , line 1053, in _getRepoXML
    raise Errors.RepoError, msg

In this case we should emit an error PK_ERROR_ENUM_FAILED_TO_DOWNLOAD
metadata so we can tell the user what is going on rather than "Internal
error".

If you give me a list of enums to add, I'll do them as quick as you
like :-)

Thanks.

Richard.





More information about the PackageKit mailing list