[packagekit] yum: detecting file conflicts and using a custom error

Tim Lauridsen tim.lauridsen at googlemail.com
Mon Apr 14 06:48:58 PDT 2008


Richard Hughes wrote:
> On Mon, 2008-04-14 at 10:03 +0200, Tim Lauridsen wrote:
>> The error messages is returned when doing a rpm test transaction, the 
>> backend (yum) just knows there is an error in the test transaction and
>> a list of errors, it dont know what kind of errors it is (conflicts in
>> this case), so we just can send a signal that something is broken and 
>> the messages it gets from rpm.
> 
> So yum doesn't send out different types of exception? If it doesn't can
> we add some?
> 
> Worst case scenario, we need to do some sort of string matching to find
> "conflicts with file from package" in the error description. If we can't
> add exception types, then I'll have to do that.
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit

Not in this case, yum call rpm to test a transaction and rpm returns a 
return code and a list of errors, if there is an error then yum raises a 
exception with the list of errors generated by rpm. It didn't knows what 
kind of errors it is.
I don't know all the errors rpm can return in this case, starting to 
parse the string, really sucks big time and i don't see the benefit of 
doing it, we have an error we can't solve, we cant do any thing else 
than abort the task.

Maybe we should make a custom error dialog to present errors, something 
with a textview so user can cut & paste the error message, instead of 
having to do screendumps.

Tim



More information about the PackageKit mailing list