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
convenience. I'll send some "cosmetic" changes later, too.
Falko
[EMAIL PROTECTED]:~/tmp/work$ ls -l
insgesamt 0
[EMAIL PROTECTED]:~/tmp/work$ tar xjf ../wpkg-0.9.10-test2
wpkg-0.9.10-test2/ wpkg-0.9.10-test2.tar.bz2
[EMAIL PROTECTED]:~/tmp/work$ tar xjf ../wpkg-0.9.10-test2.tar.bz2
[EMAIL PROTECTED]:~/tmp/work$ ls -l
insgesamt 1
drwxr-xr-x 6 falko users 648 2006-06-22 21:36 wpkg-0.9.10-test2
[EMAIL PROTECTED]:~/tmp/work$ cd wpkg-0.9.10-test2/
[EMAIL PROTECTED]:~/tmp/work/wpkg-0.9.10-test2$ patch
<../../0.9.10.test2.patch
(Stripping trailing CRs from patch.)
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff U3b C:\Dokumente und
Einstellungen\gok\Desktop\wpkg\wpkg-0.9.10-test2\wpkg.js C:\Dokumente
und Einstellungen\gok\Desktop\wpkg\wpkg-0.9.10-test2-gok\wpkg.js
|--- C:\Dokumente und
Einstellungen\gok\Desktop\wpkg\wpkg-0.9.10-test2\wpkg.js Thu Jun 22
21:28:41 2006
|+++ C:\Dokumente und
Einstellungen\gok\Desktop\wpkg\wpkg-0.9.10-test2-gok\wpkg.js Fri
Jun 23 23:46:55 2006
--------------------------
File to patch: wpkg.js
patching file wpkg.js
Hunk #1 FAILED at 234.
Hunk #2 FAILED at 252.
Hunk #3 FAILED at 1084.
Hunk #4 FAILED at 1096.
Hunk #5 FAILED at 1393.
Hunk #6 FAILED at 1403.
Hunk #7 FAILED at 1718.
Hunk #8 FAILED at 2515.
Hunk #9 FAILED at 2529.
Hunk #10 FAILED at 2559.
10 out of 10 hunks FAILED -- saving rejects to file wpkg.js.rej
--- wpkg.js.orig 2006-06-24 17:09:16.000000000 +0200
+++ wpkg.js 2006-06-24 17:35:40.000000000 +0200
@@ -234,8 +234,8 @@
if (argn("rebootcmd") != null) {
rebootCmd=(argn("rebootcmd"));
- dinfo("Reboot-Cmd is " + rebootCmd +".");
}
+ dinfo("Reboot-Cmd is " + rebootCmd +".");
// want to export the state of WPKG to registry?
if (isArgSet(argv, "/norunningstate")) {
@@ -252,14 +252,14 @@
host = WshNetwork.ComputerName.toLowerCase();
if (argn("base") != null) {
- base = argn("base");
- var base = fso.GetAbsolutePathName(base);
+ var base = argn("base");
+ base = fso.GetAbsolutePathName(base);
} else {
// use the executing location of the script as the default base path
var path = WScript.ScriptFullName;
base = fso.GetParentFolderName(path);
}
-
+ dinfo("base directory " + base + ".");
// append the settingsfile names to the end of the base path
packages_file = fso.BuildPath(base, packages_file_name);
@@ -1083,14 +1083,7 @@
} // if checkCond == null || checkPath == null
if (checkCond == "exists") {
- // Display some debugging information
- var WshShell = new ActiveXObject("WScript.Shell");
- var val;
- try {
- val = WshShell.RegRead(checkPath);
- } catch (e) {
- val = null;
- }
+ var val = getRegistryValue(checkPath);
if (val != null) {
// Some debugging information
@@ -1102,13 +1095,7 @@
return false;
}
} else if (checkCond == "equals") {
- var WshShell = new ActiveXObject("WScript.Shell");
- var val;
- try {
- val = WshShell.RegRead(checkPath);
- } catch (e) {
- val = null;
- }
+ var val = getRegistryValue(checkPath);
if (val == checkValue) {
// Some debugging information
@@ -1405,7 +1392,6 @@
// get a list of checks to perform before installation.
var checkNodes = packageNode.selectNodes("check");
- var installed = true;
// when there are no check conditions, say "not installed"
if (checkNodes.length == 0) {
@@ -1416,12 +1402,11 @@
// if all are successful, we consider package as installed
for (var i = 0; i < checkNodes.length; i++) {
if (! checkCondition(checkNodes[i])) {
- installed = false;
- //break;
+ return false;
}
}
- return installed;
+ return true;
}
/**
@@ -1732,7 +1717,7 @@
}
- info("Upgrade of " + newPackageNode.getAttribute("name") + " successful.");
+ info("Upgrade of " + newPackageNode.getAttribute("name") + " to Rev. "+
newPackageNode.getAttribute("revision") + " successful.");
// reboot the system if this package is suppose to
if (newPackageNode.getAttribute("reboot") == "true") {
@@ -2529,6 +2514,10 @@
var installedNode = installedNodes(i);
var instPackageId = installedNode.getAttribute("id");
var instPackageRevision = installedNode.getAttribute("revision");
+ var instPackageExecAttr = installedNode.getAttribute("execute");
+ if (instPackageExecAttr == "") {
+ instPackageExecAttr = "none";
+ }
for (var j = 0; j < availableNodes.length; j++) {
var availableNode = availableNodes(j);
var availPackageId = availableNode.getAttribute("id");
@@ -2539,6 +2528,7 @@
message += " ID: " + instPackageId + "\n";
message += " Old Revision: " + instPackageRevision +
"\n";
message += " New Revision: " +
availableNode.getAttribute("revision") + "\n";
+ message += " ExecAttribs: " + instPackageExecAttr +
"\n";
message += " Status: updateable\n";
message += "\n";
}
@@ -2568,14 +2558,19 @@
var packageReboot = packageNode.getAttribute("reboot");
var packageName = packageNode.getAttribute("name");
var packageId = packageNode.getAttribute("id");
+ var packageExecAttr = packageNode.getAttribute("execute");
if (packageReboot != "true") {
packageReboot = "false";
}
+ if (packageExecAttr == "") {
+ packageExecAttr = "none";
+ }
if (packageName == pack || packageId == pack) {
message += packageName + "\n";
message += " ID: " + packageId + "\n";
message += " Revision: " +
packageNode.getAttribute("revision") + "\n";
message += " Reboot: " + packageReboot + "\n";
+ message += " ExecAttribs:" + packageExecAttr + "\n";
if (searchList(settingsNodes, packageNode)) {
message += " Status: Installed\n";
} else {
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