Hi I've seen on this mailinglist, and in the CHANGES-file that environment variables now also are supported inside <check /> statements.. I upgraded my test-environment from WPKG 1.0.4 to WPKG 1.1.1 and started changing all my packages by using variables for versions:
So now in almost every package I declare a VERSION variable like this: <variable name='VERSION' value='1.0.0.9' /> Then I use this variable inside my check, install, upgrade and remove commands where appropriate: <check type="file" condition="versionequalto" path="%PROGRAMFILES%\somepath\someprogram.exe" value="%VERSION%" /> <install cmd="someprogram_installer_%VERSION%.exe /s /q" /> <upgrade cmd="someprogram_installer_%VERSION%.exe /s /q" /> <remove cmd="%PROGRAMFILES%\somepath\someprogram_uninstaller.exe /s /q /> Other packages use variables in their <check /> parts like this: <check type="uninstall" condition="exists" path="SomeProgram %VERSION%" /> But all packages using variables in their <check /> part fail... I think because their variables are not expanded. This is what I see in the debug logging: - for file-version check: ..... 2009-09-03 16:03:01, DEBUG : Checking existence of package: SomeProgram 1.0.0.9 2009-09-03 16:03:01, DEBUG : Reading variables from package SomeProgram 1.0.0.9 2009-09-03 16:03:01, DEBUG : Got variable 'VERSION' of value '1.0.0.9' 2009-09-03 16:03:01, DEBUG : Variable 'VERSION' was not defined before. Creating now. 2009-09-03 16:03:01, DEBUG : Reading variables from profile[s] 2009-09-03 16:03:01, DEBUG : Getting profiles which apply to this node. 2009-09-03 16:03:01, DEBUG : 2 profiles apply to this host. 2009-09-03 16:03:01, DEBUG : Reading variables from profile test 2009-09-03 16:03:01, DEBUG : Reading variables from host testpc001 2009-09-03 16:03:01, DEBUG : Variable VERSION = 1.0.0.9 2009-09-03 16:03:01, DEBUG : Trying to find version of C:\Program Files\somepath\someprogram.exe 2009-09-03 16:03:01, DEBUG : Obtained version '1.0.0.9'. 2009-09-03 16:03:01, DEBUG : Trying to find version of C:\Program Files\somepath\someprogramexe 2009-09-03 16:03:01, DEBUG : Obtained version '1.0.0.9'. 2009-09-03 16:03:01, DEBUG : Comparing version: '1.0.0.9' <=> '%VERSION%'. 2009-09-03 16:03:01, DEBUG : Comparing version fragments: '1' <=> 'VERSION' 2009-09-03 16:03:01, DEBUG : Checking file version 1.0.0.9 is versionequalto (than) %VERSION% - got result -1 2009-09-03 16:03:01, DEBUG : File version check for file 'C:\Program Files\somepath\someprogram.exe' returned false for operation type versionequalto 2009-09-03 16:03:01, ERROR : Could not process (upgrade) SomePackage 1.0.0.9.|Failed checking after installation. 2009-09-03 16:03:01, DEBUG : Cleaning up temporary downloaded files 2009-09-03 16:03:01, DEBUG : Restoring previous environment. ..... - for the uninstall-check: ..... 2009-09-03 16:03:29, DEBUG : Checking existence of package: SomeProgram 1.0.0.9 2009-09-03 16:03:29, DEBUG : Reading variables from package SomeProgram 1.0.0.9 2009-09-03 16:03:29, DEBUG : Got variable 'VERSION' of value '1.0.0.9' 2009-09-03 16:03:29, DEBUG : Variable 'VERSION' was not defined before. Creating now. 2009-09-03 16:03:29, DEBUG : Reading variables from profile[s] 2009-09-03 16:03:29, DEBUG : Getting profiles which apply to this node. 2009-09-03 16:03:29, DEBUG : 2 profiles apply to this host. 2009-09-03 16:03:29, DEBUG : Reading variables from profile test 2009-09-03 16:03:29, DEBUG : Reading variables from host testpc001 2009-09-03 16:03:29, DEBUG : Variable VERSION = 1.0.0.9 2009-09-03 16:03:29, DEBUG : Uninstall entry for SomeProgram %VERSION% missing: test failed 2009-09-03 16:03:29, ERROR : Could not process (upgrade) SomeProgram 1.0.0.9.|Failed checking after installation. 2009-09-03 16:03:29, DEBUG : Cleaning up temporary downloaded files 2009-09-03 16:03:29, DEBUG : Restoring previous environment. ..... Am I doing something wrong? or are variables still not fully supported in <check /> statements within WPKG 1.1.1? If not, I think it would be great if variable expansion was also supported in all types of <check /> statements/parameters. Especially for such version variables.. Robin -- Denk aan het milieu - is het nodig deze mail te printen? ** Email Disclaimer: ** This e-mail and the information it contains may be confidential, legally privileged and protected by law. Access by the intended recipient only is authorised. If you are not the intended recipient, please notify the sender immediately and delete this e-mail from your system. Any review, distribution, reproduction, publication or other use of this e-mail by persons or entities other than the intended recipient is prohibited.
------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/wpkg-users
