Tomasz Chmielewski schrieb:
> Falko Trojahn wrote:
> 
>>Hello Gordon,
>>
>>[EMAIL PROTECTED] schrieb:
>>
>>>Hello again,
>>>
>>>this patch adds some debug output, adds a tad more information to 
>>>querypackage() and simplifies the registrycheck-code by using an already 
>>>existant function.
>>>
>>>no functional changes.
>>>
>>>
>>
>>I'm sorry, but this patch didn't work here - don't know why?
>>I applied it manually, made a new diff and re-send it for your
> 
> 
> It's because of:
> --- C:\Dokumente und...
> +++ C:\Dokumente und...
> 
> on a non-windows machine (and patch utility couldn't find the right file) :)
> 
Don't think so, since "patch" asked for the file to patch, I put in
"wpkg.js", and then "10 out of 10 hunks failed" ...
But the "diff U3b ..." options seems strange to me, this gives an error
here (diff: invalid context length `3b'
diff: Try `diff --help' for more information.) so, who knows ... Or it's
just the CRLF problem again.

Well, attached are two other patches - one for consolidation of
variables, one for some dinfo-instead-of-if-debug lines.

One remark: perhaps it would be better to set the default of the
variable quitonerror to true in the distribution?

Falko

--- wpkg.js.0.9.10-test2        2006-06-22 21:28:41.000000000 +0200
+++ wpkg.js     2006-06-25 11:20:20.000000000 +0200
@@ -91,16 +91,16 @@
  
******************************************************************************/
 
 // script wide properties
-var force;        // when true: doesn't consider wpkg.xml but checks existence 
of packages.
-var forceInstall; // forces instalation over existing packages
+var force = false;        // when true: doesn't consider wpkg.xml but checks 
existence of packages.
+var forceInstall = false; // forces instalation over existing packages
 
-var quitonerror;
+var quitonerror = false;
 
 var err_summary = "";
-var debug;
-var dryrun;
+var debug = false;
+var dryrun = false;
 
-var quiet;
+var quiet = false;
 var profile;
 var host;
 var base;
@@ -176,16 +176,12 @@
     // process property named arguments that set values
     if (isArgSet(argv, "/debug") || isArgSet(argv, "/verbose")) {
         debug = true;
-    } else {
-        debug = false;
     }
     
     // process property named arguments that set values
     if (isArgSet(argv, "/dryrun")) {
         dryrun = true;
         debug = true;
-    } else {
-        dryrun = false;
     }
     
     // if the user is wanting command help, give it to him
@@ -197,8 +193,6 @@
     // process property named arguments that set values
     if (isArgSet(argv, "/quiet")) {
         quiet = true;
-    } else {
-        quiet = false;
     }
 
     // if the user passes /nonotify, we don't want to notify the user
@@ -214,22 +208,16 @@
     // process property named arguments that set values
     if (isArgSet(argv, "/force")) {
         force = true;
-    } else {
-        force = false;
     }
 
     // process property named arguments that set values
     if (isArgSet(argv, "/quitonerror")) {
         quitonerror = true;
-    } else {
-        quitonerror = false;
     }
     
     // process property named arguments that set values
     if (isArgSet(argv, "/forceinstall")) {
         forceInstall = true;
-    } else {
-        forceInstall = false;
     }
     
     if (argn("rebootcmd") != null) {
--- wpkg.js.0.9.10-test2        2006-06-22 21:28:41.000000000 +0200
+++ wpkg.js     2006-06-25 11:28:45.000000000 +0200
@@ -590,23 +590,23 @@
         
         // if package is no longer present, mark for remove
         if (!found) {
-            if (debug) { info("marking package: " + 
installedPackageNode.getAttribute("id") + " for remove"); }
+            dinfo("marking package: " + 
installedPackageNode.getAttribute("id") + " for remove");
            removablesArray.push(installedPackageNode);
         }
     }
 
     var allPackagesArray = getAllPackages();
-    if (debug) { info("number of packages to remove: " + 
removablesArray.length); }
+    dinfo("number of packages to remove: " + removablesArray.length); 
     // check for zombies, then really remove trashed packages
     for (i in removablesArray) {
        var packageName = removablesArray[i].getAttribute("id");
        var found = false;
-     if (debug)   info("Checking " + packageName + " to remove.");
+        dinfo("Checking " + packageName + " to remove.");
         for (j in allPackagesArray) {
             if (allPackagesArray[j].getAttribute("id") == packageName)       
found = true;
        }
        if (found) {
-            if (debug) { info("Checked removal of package: " + packageName); }
+            dinfo("Checked removal of package: " + packageName);
             notifyUserStart();
             removePackage(removablesArray[i]);
        } else {
@@ -1544,10 +1544,8 @@
 
                if (nodeInst == null) {
                  
-                 if (debug) { 
-                   info("Package " + packageName +
+                 dinfo("Package " + packageName +
                         " missing from settings file, adding it now.");
-                 }
                  
                  settings.appendChild(packageNode);
                  saveXml(settings, settings_file);
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
wpkg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wpkg-users

Reply via email to