[wpkg-users] Problem with a package can any one help here?

Tomasz Chmielewski mangoo at wpkg.org
Thu Apr 13 23:45:44 CEST 2006


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





wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users




More information about the wpkg-users mailing list