[yum-cvs] 2 commits - plugins/security

Tim Lauridsen timlau at linux.duke.edu
Wed Sep 19 17:22:24 UTC 2007


 plugins/security/security.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 3d3c4961f0551029e0968afa24e4b5fbdacbbc76
Merge: 071737f... 98f7b71...
Author: Tim Lauridsen <tla at rasmil.dk>
Date:   Wed Sep 19 19:20:56 2007 +0200

    Merge branch 'yum-sec-upmd-info-uniq' of http://people.redhat.com/jantill/gits/yum-utils

commit 98f7b71ef99d8f6ab3b12fb863c2bd7210e4d7c8
Author: James Antill <james at code.and.org>
Date:   Wed Sep 19 11:02:15 2007 -0400

    Don't print metadata more than once

diff --git a/plugins/security/security.py b/plugins/security/security.py
index f8f1cf8..a2d0ff4 100755
--- a/plugins/security/security.py
+++ b/plugins/security/security.py
@@ -159,6 +159,9 @@ class SecurityListCommands:
                 msg(" %s %-8s %s" % (str(ref['id']), md['type'], pkg))
         else:
             msg("%s %-8s %s" % (md['update_id'], md['type'], pkg))
+
+    def show_pkg_exit(self):
+        pass
             
     def doCommand(self, base, basecmd, extcmds):
         ygh = base.doPackageLists('updates')
@@ -207,18 +210,27 @@ class SecurityListCommands:
                     continue                
                 self.show_pkg(msg, pkg, md)
         ysp_chk_used_map(used_map, msg)
+
+        self.show_pkg_exit()
 #        else:
 #            return 1, [str(PluginYumExit('Bad %s commands' % basecmd))]
         return 0, [basecmd + ' done']
             
 class SecurityInfoCommands(SecurityListCommands):
+    show_pkg_info_done = {}
     def getNames(self):
         return ['info-security', 'info-sec']
 
     def show_pkg(self, msg, pkg, md, disp=None):
+        if md['update_id'] in self.show_pkg_info_done:
+            return
+        self.show_pkg_info_done[md['update_id']] = True
         msg(md)
         msg('')
     
+    def show_pkg_exit(self):
+        self.show_pkg_info_done = {}
+            
 def config_hook(conduit):
     '''
     Yum Plugin Config Hook: 



More information about the Yum-cvs-commits mailing list