[packagekit] packagekit: Branch 'master' - 9 commits

Boyd Timothy btimothy at gmail.com
Fri Nov 30 06:22:42 PST 2007


On Nov 30, 2007 6:53 AM, Richard Hughes <hughsient at gmail.com> wrote:
> On Thu, 2007-11-29 at 23:54 -0800, Richard Hughes wrote:
> > pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString().c_str() );
>
> Boyd (and the other zypp dudes),
>
> First and foremost: It looks like you are all rocking with the zypp
> backend. Keep up the good work.
>
> Just a friendly note: PK_ERROR_ENUM_INTERNAL_ERROR is meant to be
> internal to packagekitd rather than a "I don't know which enum to
> choose" value. The method for choosing error enums is to check the list
> in pk-enum.h and choose one of those. If none of those are suitable then
> we can create as many as we need really trivially.
>
> For instance, I would have written that line of code:
>
> pk_backend_error_code(backend, PK_ERROR_ENUM_UNABLE_TO_OPEN_DB, "Could
> not open /var/cache/zypp/zypp.db when resolving");
>
> And then a user gets a nice translation of the error and a useful
> non-translated geeky thing to report in bugzilla.
>
> Could you make a list of any new error enums you want to use? I can then
> add them to PK and gnome-pk - you can add as many or as few as you like.
>
> So far I can see:
>
> pk_backend_error_code(backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Failed to open database");
>  - see above
> pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Error enumerating repositories");
>  - what does this actually mean?
> pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString ().c_str ());
>  - you should probably try to catch the errors indivually else we've got
> nothing to translate
> pk_backend_error_code (backend, PK_ERROR_ENUM_UNKNOWN, "invalid search mode");
>  - Is PK_ERROR_ENUM_FILTER_INVALID what you want or do we need
> PK_ERROR_ENUM_SEARCH_INVALID?
> pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Could not enable/disable the repo");
>  - Do we need a PK_ERROR_ENUM_REPO_CHANGE_FAILED?
>
> Please can you add to this list when you get a minute - no panic, just a
> friendly note in your ear :-)

Yeah, thanks for the reminder.  I've definitely been in "get this
sucker functioning" mode and have been ignoring the PK_ERROR_*
correctness for maybe too long.  My intention is to revisit the ENUMs
within the next couple weeks.

Thanks,

Boyd



More information about the PackageKit mailing list