[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51

David Steele dsteele at gmail.com
Wed May 15 10:09:38 UTC 2013


The following commit has been merged in the master branch:
commit e00ae518db79eb531066e1a1b063972c3917c7c7
Author: David Steele <dsteele at gmail.com>
Date:   Fri Mar 22 19:34:04 2013 -0400

    detect_well_known_errors - Generate 'grep' help command from INCLUDE.
    
    ... and EXCLUDE, eliminating the need for COMMAND in known problem
    definition files.
    
    Conflicts:
    	master-bin/detect_well_known_errors

diff --git a/master-bin/detect_well_known_errors b/master-bin/detect_well_known_errors
index a9a6d7c..dd64e5b 100755
--- a/master-bin/detect_well_known_errors
+++ b/master-bin/detect_well_known_errors
@@ -151,6 +151,15 @@ class Problem():
 
         return( False )
 
+    def get_command(self):
+
+        cmd = "grep -E \"%s\"" % self.INCLUDE
+
+        if "EXCLUDE" in self.__dict__:
+            cmd += " | grep -v -E \"%s\"" % self.EXCLUDE
+
+        return(cmd)
+
 class FailureManager():
     """Class to track known failures encountered, by package,
        where (e.g. 'fail'), and known problem type"""
@@ -356,7 +365,7 @@ def update_tpl( basedir, section, problem, failures, logdict, ftpl, ptpl, pkgsdb
                                 'HEADER': problem.HEADER,
                                 'SECTION': section,
                                 'HELPTEXT': problem.HELPTEXT,
-                                'COMMAND': problem.COMMAND,
+                                'COMMAND': problem.get_command(),
                                 'PACKAGE_LIST': pkg_text,
                                 'COUNT': len(failures),
                                 } )

-- 
piuparts git repository



More information about the Piuparts-commits mailing list