[wpkg-users] Internal Variables Not Working in Remove Commands

Chris Allen callen at katmairesearch.com
Tue Jun 9 02:55:22 CEST 2009


For some reason I can't seem to use wpkg variables in my remove commands.
Install, and upgrade commands work fine for me.

To give you all an example of this problem below I pasted my cygwin install
script, notice the part at the end:


<?xml version="1.0" encoding="UTF-8"?>

<!-- Tested on: XP 32, Vista 64 -->

<packages>

<package id="cygwin"
    name="Cygwin"
    revision="1"
    priority="10"
    reboot="false">

 <check type="file" condition="exists"
path="%SYSTEMDRIVE%\cygwin\cygwin.bat" />
 <variable name='cygroot' value='%SYSTEMDRIVE%\cygwin' />
 <install cmd='cmd /c "%WPKG%\tools\robocopy.exe"
"%SOFTWARE%\bundled\cygwin\cygwin" %cygroot% /E /R:0 /W:0 /NFL /NDL /NP /NJH
/NJS' >
   <exit code="1" />
   <exit code="2" />
   <exit code="4" />
   <exit code="8" />
 </install>
 <install cmd='cmd /c %cygroot%\bin\mount -s -f %cygroot% /' />
 <install cmd='cmd /c %cygroot%\bin\mount -s -f %cygroot%\bin /usr/bin' />
 <install cmd='cmd /c %cygroot%\bin\mount -s -f %cygroot%\lib /usr/lib' />
 <install cmd='cmd /c "%cygroot%\bin\mkpasswd -ld > %cygroot%\etc\passwd"'
/>
 <install cmd='cmd /c "%cygroot%\bin\mkgroup -ld > %cygroot%\etc\group"' />

 <upgrade cmd='cmd /c "%WPKG%\tools\robocopy.exe"
"%SOFTWARE%\bundled\cygwin\cygwin" %cygroot% /E /R:0 /W:0 /NFL /NDL /NP /NJH
/NJS' >
   <exit code="1" />
   <exit code="2" />
   <exit code="4" />
   <exit code="8" />
 </upgrade>
 <upgrade cmd='cmd /c "%cygroot%\bin\mkpasswd -ld > %cygroot%\etc\passwd"'
/>
 <upgrade cmd='cmd /c "%cygroot%\bin\mkgroup -ld > %cygroot%\etc\group"' />

<!-- do not use variables in remove commands
  <remove cmd="cmd /c rmdir /s /q %cygroot% />  will FAIL -->

 <remove cmd="cmd /c rmdir /s /q C:\cygwin" />
</package>

</packages>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20090608/0580bca8/attachment-0001.html>


More information about the wpkg-users mailing list