[wpkg-users] wpkg-0.9.6-test1 released

Paul Griffith paulg at cs.yorku.ca
Wed Mar 8 19:35:08 CET 2006


Here is a patch to fix the checkType undefined error...

I am not sure if the logic is all correct but it worked for the simple
test I did.

---------cut here ----

 diff -u wpkg-orig.js wpkg.js
--- wpkg-orig.js        Wed Mar  8 13:31:04 2006
+++ wpkg.js     Wed Mar  8 13:29:38 2006
@@ -1234,20 +1234,33 @@
 
     // loop over every condition check
     // if all are successful, we consider package as installed
-    for (var i = 0; i < checkNodes.length; i++) {
-        if (! checkCondition(checkNodes[i])) {
-            info("Checking presence of " + packageName +
-                 "; " + checkType + " check condition failed !");
-            installed = false;
-            //break;
-        } else {
-            info("Checking presence of " + packageName +
-                 "; " + checkType + " check condition met.");
-        }
-    }
-    return installed;
+    for (var i = 0; i < checkNodes.length; i++) {
+        var checkNode = checkNodes(i);
+        var checkType = checkNode.getAttribute("type");
+        var checkCond = checkNode.getAttribute("condition");
+        var checkPath = checkNode.getAttribute("path");
+        
+        if (checkType == null ||
+            checkCond == null ||
+            checkPath == null) {
+            throw new Error("Invalid check condition on package " +
+                packageName + ", aborting.");
+        } else if (! checkCondition(checkNodes[i])) {
+            info("Checking presence of " + packageName +
+                "; " + checkType + " check condition failed !");
+
+            installed = false;
+            //break;
+        } else {
+            info("Checking presence of " + packageName +
+                "; " + checkType + " check condition met.");
+        }
+    }
+
+    return installed;
 }
 
--------------- cut here -------------------------------


On Tue, Mar 07, 2006 at 09:40:55PM +0100, Tomasz Chmielewski wrote:
> WPKG 0.9.6-test1 has been released.
> 
> This is a testing release.
> 
> Applied three patches (well, one huge, really), which implement:
> * "logical tests" - http://wpkg.org/index.php/Logical_tests
> * "version checking" - http://wpkg.org/index.php/Version_checking
> * "package dependencies" - http://wpkg.org/index.php/Package_dependencies
> 
> 
> Thanks to Frank Lee for all new features!
> 
> You can find original patches and descriptions here: 
> http://www.sp.phy.cam.ac.uk/~rl201/wpkg/
> 
> -- 
> Tomasz Chmielewski
> http://wpkg.org
> 
> 




More information about the wpkg-users mailing list