[Piuparts-commits] rev 607 - piatti/home/piupartsm/bin/known_problems trunk

Holger Levsen holger at alioth.debian.org
Tue Dec 29 14:08:25 UTC 2009


Author: holger
Date: 2009-12-29 14:08:25 +0000 (Tue, 29 Dec 2009)
New Revision: 607

Added:
   piatti/home/piupartsm/bin/known_problems/cron_error_after_removal_error.conf
Removed:
   piatti/home/piupartsm/bin/known_problems/output_from_cron_error.conf
Modified:
   trunk/piuparts-report.py
Log:
detect more errors from cron and fix counting of detected errors

Copied: piatti/home/piupartsm/bin/known_problems/cron_error_after_removal_error.conf (from rev 587, piatti/home/piupartsm/bin/known_problems/output_from_cron_error.conf)
===================================================================
--- piatti/home/piupartsm/bin/known_problems/cron_error_after_removal_error.conf	                        (rev 0)
+++ piatti/home/piupartsm/bin/known_problems/cron_error_after_removal_error.conf	2009-12-29 14:08:25 UTC (rev 607)
@@ -0,0 +1,19 @@
+#
+# detect packages with cron errors after the package has been removed
+#
+COMMAND=`rgrep -E "(FAIL: Cron file .* has output with package removed|ERROR: Command failed.*'/etc/cron\..*/.*'])" fail bugged | cut -d " " -f1 | sed -e "s#\.log:.*#.log#" | sort -u 2>/dev/null`
+ISSUE=0
+HEADER='Packages with failed logs because a cron file has output and/or exits with error after the package has been removed'
+HELPTEXT='
+<p>
+From <a href="http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.5">http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.5</a>
+</p>
+
+<pre>
+The scripts or crontab entries in these directories should check if all
+necessary programs are installed before they try to execute them. Otherwise,
+problems will arise when a package was removed but not purged since 
+configuration files are kept on the system in this situation.
+</pre>
+
+'

Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py	2009-12-29 13:01:41 UTC (rev 606)
+++ trunk/piuparts-report.py	2009-12-29 14:08:25 UTC (rev 607)
@@ -361,7 +361,7 @@
     "post_installation_script_error.tpl": "due to post-installation maintainer script failed",
     "pre_removal_script_error.tpl": "due to pre-removal maintainer script failed",
     "post_removal_script_error.tpl": "due to post-removal maintainer script failed",
-    "output_from_cron_error.tpl": "due to output from cron after removal",
+    "cron_error_after_removal_error.tpl": "due to errors from cronjob after removal",
     "problems_and_no_force_error.tpl": "due to not enough force being used"
 }
 
@@ -859,8 +859,8 @@
              }))
             f.close()
             if state == "failed-testing":
-              count_bugged = len(analysis.split("/bugged/"))-1 
-              count_failed = len(analysis.split("/fail/"))-1 
+              count_bugged = count(analysis,"/bugged/")-1 
+              count_failed = count(analysis,"/fail/")-1 
               if count_bugged != 0 or count_failed != 0:
                 substats = ": "
               if count_bugged != 0:




More information about the Piuparts-commits mailing list