B Royles (Staff) wrote:
Hi all,

I am currently having problems getting this package working, can any one see where I am going wrong?

I am getting this error :-

checking existence of package:VMware Player

Installation error while synchronizing package VMware Player, synchronization aborting.

Invalid check condition on package VMware Player, aborting.

Right.

You found a bug :)

Originally, WPKG needed three attributes for a "check":

- type="..."
- condition="..."
- path="..."

When you look at wpkg.js (0.9.8-test1), starting on line 1286:

        if (checkType == null ||
            checkCond == null ||
            checkPath == null) {
            throw new Error("Invalid check condition on package " +
                packageName + ", aborting.");

When you look at your package definition, you have:

        <check type="logical" condition="or">

This means, that path="..." is missing (checkPath == null), and because of that, you get "Invalid check condition on package..." error.

A quick fix would be to change your package definition to contain some fictional path:

<check type="logical" condition="or" path="blah">


But probably, we should change the wpkg.js, as the path is not needed in "logical" checks.

So, we should replace wpkg.js source on line 1286 (what I pasted above), with:

        if (checkType == null ||
            checkCond == null) {
            throw new Error("Invalid check condition on package " +
                packageName + ", aborting.");

Basically, we remove "|| checkPath == null".

After that, it should work for you.


The question is, is it safe to remove it? It was added there for a good reason.

But when we look at each check type in the sources (i.e., checkType == "uninstall" on line 1116), it contains a "sanity check" - check condition and path have to be there.


Or did I miss something, and it's not safe to remove "|| checkPath == null" from lines 1287-1288?


--
Tomasz Chmielewski
http://wpkg.org




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
wpkg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wpkg-users

Reply via email to