[packagekit] yum2 error fixes

Richard Hughes hughsient at gmail.com
Sun Feb 17 10:37:32 PST 2008


On Sat, 2008-02-16 at 16:24 -0500, Robin Norwood wrote:
> 
> FYI, the new code looks like this instead of what I quoted above:
> 
>         except yum.Errors.RepoError,e:
>             self.ErrorCode(ERROR_NO_CACHE,"Yum cache is invalid")

If you do ErrorCode, the daemon expects a Finished() very soon. In this
instance you want to use Message("The package cache is invalid and is
being rebuilt") and just do it. After all, we shouldn't have to requeue
manually when we know what's going to happen next.

>             self._refresh_yum_cache()
>             self.Finished(EXIT_FAILED)
>             self.Exit()
> 
> And _refresh_yum_cache calls: StatusChanged(STATUS_REFRESH_CACHE)

Yup.

Richard.





More information about the PackageKit mailing list