[yum-cvs] yum-utils/plugins/skip-broken skip-broken.py, 1.2, 1.2.2.1 skip-broken.conf, 1.3, 1.3.2.1

Tim Lauridsen timlau at linux.duke.edu
Tue Mar 13 11:50:39 UTC 2007


Update of /home/groups/yum/cvs/yum-utils/plugins/skip-broken
In directory login1.linux.duke.edu:/tmp/cvs-serv26255/plugins/skip-broken

Modified Files:
      Tag: yum-utils-1_0_X
	skip-broken.py skip-broken.conf 
Log Message:
Added 'check_always' option to the skip-broken plugin.
Setting 'check_always=1' will make the skip-broken check run every time.
(rhbz #231523)
Also merged changes from yum-utils HEAD

Index: skip-broken.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/plugins/skip-broken/skip-broken.py,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- skip-broken.py	31 Dec 2006 09:15:23 -0000	1.2
+++ skip-broken.py	13 Mar 2007 11:50:37 -0000	1.2.2.1
@@ -5,7 +5,7 @@
 # Option.
 #
 # Ex.
-# yum --ignore-broken install foo
+# yum --skip-broken install foo
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -79,8 +79,12 @@
 def config_hook(conduit):
     '''
     Yum Plugin Config Hook: 
-    Setup the option parser with the '--ignore-broken' command line option
+    Setup the option parser with the '--skip-broken' command line option
     '''
+    global check_always
+    #  Get 'check_always' option from plugin conf
+    check_always = conduit.confBool('main', 'check_always', default=False)    
+    
     parser = conduit.getOptParser()
     if parser:
         parser.add_option("", "--skip-broken", dest="skipbroken",
@@ -91,20 +95,21 @@
     '''
     Yum Plugin PreResolve Hook:
     Check and remove packages with dependency problems
-    only runs if then '--ignore-broken' was set. 
+    only runs if then '--skip-broken' was set. 
     '''
     opts, commands = conduit.getCmdLine()
     if hasattr(opts,'skipbroken'):
-        if opts.skipbroken:
+        if opts.skipbroken or check_always:
             # get yum base
             conduit.info(2,'Checking packages for dependency problems')
             base = conduit._base
             cd = CheckDependency(base,conduit.info)
             cd.dumpTsInfo()
             (good,bad) = cd.preDepCheck()
+            tsInfo = base.tsInfo
             for txmbr,err in bad:
                 # Removing bad packages for self.tsInfo
-                base.tsInfo.remove(txmbr.po.pkgtup)
+                tsInfo.remove(txmbr.po.pkgtup)
                 conduit.info(2,"%s failed dependency resolving " % txmbr.po)
                 conduit.info(2,"%s " % err[0])
             for txmbr in good:

Index: skip-broken.conf
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/plugins/skip-broken/skip-broken.conf,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- skip-broken.conf	25 Sep 2006 13:05:38 -0000	1.3
+++ skip-broken.conf	13 Mar 2007 11:50:37 -0000	1.3.2.1
@@ -1,3 +1,4 @@
 [main]
 enabled = 1
+check_always = 0
 




More information about the Yum-cvs-commits mailing list