[packagekit] Reviewing use of internal-error
Robin Norwood
rnorwood at redhat.com
Mon Mar 24 11:06:21 PDT 2008
On Mon, 24 Mar 2008 17:32:06 +0000
Richard Hughes <hughsient at gmail.com> wrote:
> 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 :-)
I'm going through the yum2 backend now, I'll send a list of the new
error enums that I come up with, so y'all can sanity check them.
-RN
--
Robin Norwood
Red Hat, Inc.
"The Sage does nothing, yet nothing remains undone."
-Lao Tzu, Te Tao Ching
More information about the PackageKit
mailing list