[packagekit] yum2 error fixes

Robin Norwood rnorwood at redhat.com
Thu Feb 14 09:46:09 PST 2008


On Thu, 14 Feb 2008 07:41:37 +0000
Richard Hughes <hughsient at gmail.com> wrote:

> In the yum2 backend we have loads of these:
> 
>             except yum.Errors.InstallError,e:
>                 msgs = ';'.join(e)
>                 self.ErrorCode(ERROR_PACKAGE_ALREADY_INSTALLED,msgs)
>                 self.Exit()
> 
> i.e. in an error, send error code, and exit the script.
> 
> What we probably need to do is:
> 
> Not fatal errors (i.e. the script can continue):
> 
>    self.ErrorCode(ERROR_PACKAGE_ALREADY_INSTALLED,"foo")
>    self.Finished(EXIT_FAILED)
>    return
> 
> and for fatal errors:
> 
>    self.ErrorCode(ERROR_INTERNAL_ERROR,"foo")
>    self.Finished(EXIT_FAILED)
>    self.Exit()
> 
> I think we are exiting quite a bit without needing to - and we
> certainly need to send finished else bad things happen to the daemon.

Yeah, I'll fix this today.  A result of me just copying the existing
behavior wholesale.

(We also need to look at catching more error cases in general, and
getting better errors up to the UI)

-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