[Yum-devel] yum-security plugin review, possible merge into yum-utils?

Tim Lauridsen tla at rasmil.dk
Thu Apr 19 07:50:25 UTC 2007


James Antill wrote:
> On Fri, 2007-04-13 at 07:44 +0200, Terje Røsten wrote:
>   
>> James Antill
>>     
>>>  
>>> 2. If you remove _everything_ in the preresolve_hook (think security
>>> only updates, when there are none) you end up with an empty transaction.
>>> At which point nothing in yum spots this and asks the user to confirm a
>>> transaction that does nothing. 
>>>       
>> I have seen the same issue with Tim's skip-broken plugin when everything is
>> broken :-)
>>     
>
>  *nods* ... here's the "obvious" fix for that against current CVS:
>
> Index: depsolve.py
> ===================================================================
> RCS file: /cvsroot/yum/cvs/yum/yum/depsolve.py,v
> retrieving revision 1.160
> diff -u -p -r1.160 depsolve.py
> --- depsolve.py 17 Apr 2007 20:54:03 -0000      1.160
> +++ depsolve.py 18 Apr 2007 20:50:15 -0000
> @@ -795,6 +795,8 @@ class Depsolve(object):
>  
>              if not deps:
>                  # FIXME: this doesn't belong here at all...
> +                if not len(self.tsInfo):
> +                    return (0, ['Success - empty transaction'])
>                  for txmbr in self.tsInfo.getMembers():
>                      if self.allowedMultipleInstalls(txmbr.po) and \
>                             txmbr.ts_state == 'u':
>
> ...this works for me(tm).
>   
Look sane to me, i have submitted it to CVS Head.

>  Did anyone have a look at the plugin itself and have any
> comments/questions?
>
>   
The plugin look very nice, good example of how to extend the yum command 
by a plugin.
If you like i can add the plugins to yum-utils.

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum-devel/attachments/20070419/c84e1056/attachment.htm 


More information about the Yum-devel mailing list