[Yum] Treating 'not found' packages as errors
anders.blomdell at control.lth.se
Thu Apr 24 15:15:57 UTC 2008
seth vidal wrote:
> On Thu, 2008-04-24 at 11:44 +0200, Anders Blomdell wrote:
>> OK, found it. Kind of shared error, fix is:
>> --- __init__.py~ 2007-12-05 23:27:40.000000000 +0100
>> +++ __init__.py 2008-04-24 11:40:59.000000000 +0200
>> @@ -589,7 +589,7 @@
>> errors = self.ts.run(cb.callback, '')
>> - if errors:
>> + if errors != None:
>> raise Errors.YumBaseError, errors
>> if not self.conf.keepcache:
> Ah, what version of yum are you using?
> B/c the above is already fixed in HEAD and in the version released in
> fedora rawhide.
OK, found it in the git repository:
errors = self.ts.run(cb.callback, '')
# ts.run() exit codes are, hmm, "creative": None means all ok, empty
# list means some errors happened in the transaction and non-empty
# list that there were errors preventing the ts from starting...
if errors is None:
elif len(errors) == 0:
errstring = _('Warning: scriptlet or other non-fatal errors occurred
raise Errors.YumBaseError, errors
Why doesn't 'len(errors) == 0' case not raise an exception?
Anders Blomdell Email: anders.blomdell at control.lth.se
Department of Automatic Control
Lund University Phone: +46 46 222 4625
P.O. Box 118 Fax: +46 46 138118
SE-221 00 Lund, Sweden
More information about the Yum