[wpkg-users] Check type for revision
Michel Albert
Michel.Albert at statec.etat.lu
Tue Mar 27 15:32:50 CEST 2007
Jochum van der Heide wrote:
> Michel Albert wrote:
>> As I see there is no way to check if a package is already installed
>> under a certain revision.
>> I would find it very helpful to run certain tasks only for certain
>> revisions of the package.
>
> You mean this?:
> http://www.wpkg.org/index.php/Packages.xml#Check_conditions_.2F_check_type
>
>
> -Jochum
Yes and No ;)
As I understand it, the check that looks at the file version does not
compare to the revision from the package entry ( as in <package id="foo"
revision="123"...).
But it instead looks at the file version itself.
What I am looking for is something like this:
<package id="foo" revision="123">
<check type="revision" condition="equals" value="122">
<upgrade cmd="runsomething.exe" />
</check>
</package>
So now, if wpkg runs, and the currently installed revision on the client
machine is "122", it executes the commands embedded in that tag. Next
time an upgrade becomes necessary, the package might look like this:
<package id="foo" revision="124">
<check type="revision" condition="equals" value="122">
<upgrade cmd="runsomething.exe" />
</check>
...
</package>
When the client runs wpkg again, the normal update procedure runs
without executing "runsomething.exe" as the current revision on the
client maching is "123" and not "122".
In our case, the situation is as follows. We added a package for
FileZilla. So now the clients execute wpkg, and FileZilla gets
installed. Later we realised that FZ does not remember settings in the
Site-Manager. This is because it needs write access to
%PROGRAMFILES%\FileZilla\FileZilla.xml and the users a running as
restricted users.
What was next, I created a quick "AutoIt" script that checks if the file
already exists, if not, it copies it to the FZ folder and sets the
access rights to "full access". This I did in an "upgrade" line and I
increased the revision of the FZ package. Now as soon as wpkg runs on
the clients, it corrects itself. This however is a one-shot action that
does not need to repeat on every upgrade from the package. So it would
be useful to limit it to a specific revision, or revision-range (say,
revision <= 122).
Unless there is another way of realising this in wpkg.....
Regards,
--
Mich
_______________________________________________
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