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).
 Did anyone have a look at the plugin itself and have any
comments/questions?

-- 
James Antill <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to