On Jul 28, 2007, at 2:39 PM, Jo Rhett wrote:
Jo Rhett wrote:This patch makes us defensive about good results from CheckPackage.c. Ihave tested this extensively and it works properly.The following patch is the same except the CfLog invocations. I misunderstood the use of the third argument. This is better. Index: do.c =================================================================== --- do.c (revision 426) +++ do.c (working copy) @@ -2794,6 +2794,16 @@ match = PackageCheck(ptr->name, ptr->pkgmgr, ptr->ver, ptr->cmp); + /* Check for a problem executing the command */ + Verbose("PackageCheck return = %d\n", match); + if ( (match != 1) && (match != 0) ) + {+ snprintf(OUTPUT,CF_BUFSIZE,"Error: Package manager query failed,skipping %s\n", ptr->name); + CfLog(cferror,OUTPUT,""); + ptr->done = 'y'; + continue; + } +
Yikes! Somehow this part of the patch made it into r429 as:
-
- match = PackageCheck(ptr->name, ptr->pkgmgr, ptr->ver, ptr->cmp);
-
+
+/* Check for a problem executing the command */
+ if ((match != 1) && (match != 0))
+ {
+ snprintf(OUTPUT,CF_BUFSIZE,"Error: Package manager query
failed, skipping %s\n", ptr->name);
+ CfLog(cferror,OUTPUT,""); + ptr->done = 'y'; + continue; + } +Now no package checking works because PackageCheck is never called. Mark, can you add that line back in?
-- Eric Searcy OSU Open Source Lab
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Bug-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/bug-cfengine
