I just noticed that my example had an environment variable in the path definition for the internal wpkg variable. The problem remains even if I don't contain the environment variable in the wpkg variable. ie. <variable name='cygroot' value='c:\cygwin' /><br>
<br><div class="gmail_quote">On Mon, Jun 8, 2009 at 5:55 PM, Chris Allen <span dir="ltr"><<a href="mailto:callen@katmairesearch.com">callen@katmairesearch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For some reason I can't seem to use wpkg variables in my remove commands. Install, and upgrade commands work fine for me.<br><br>To give you all an example of this problem below I pasted my cygwin install script, notice the part at the end:<br>
<br><br><?xml version="1.0" encoding="UTF-8"?><br><br><!-- Tested on: XP 32, Vista 64 --><br><br><packages><br><br><package id="cygwin" <br> name="Cygwin"<br>
revision="1"<br> priority="10"<br> reboot="false"><br> <br> <check type="file" condition="exists" path="%SYSTEMDRIVE%\cygwin\cygwin.bat" /><br>
<variable name='cygroot' value='%SYSTEMDRIVE%\cygwin' /><br> <install cmd='cmd /c "%WPKG%\tools\robocopy.exe" "%SOFTWARE%\bundled\cygwin\cygwin" %cygroot% /E /R:0 /W:0 /NFL /NDL /NP /NJH /NJS' ><br>
<exit code="1" /><br> <exit code="2" /><br> <exit code="4" /><br> <exit code="8" /><br> </install><br> <install cmd='cmd /c %cygroot%\bin\mount -s -f %cygroot% /' /><br>
<install cmd='cmd /c %cygroot%\bin\mount -s -f %cygroot%\bin /usr/bin' /><br> <install cmd='cmd /c %cygroot%\bin\mount -s -f %cygroot%\lib /usr/lib' /><br> <install cmd='cmd /c "%cygroot%\bin\mkpasswd -ld > %cygroot%\etc\passwd"' /><br>
<install cmd='cmd /c "%cygroot%\bin\mkgroup -ld > %cygroot%\etc\group"' /><br><br> <upgrade cmd='cmd /c "%WPKG%\tools\robocopy.exe" "%SOFTWARE%\bundled\cygwin\cygwin" %cygroot% /E /R:0 /W:0 /NFL /NDL /NP /NJH /NJS' ><br>
<exit code="1" /><br> <exit code="2" /><br> <exit code="4" /><br> <exit code="8" /><br> </upgrade><br> <upgrade cmd='cmd /c "%cygroot%\bin\mkpasswd -ld > %cygroot%\etc\passwd"' /><br>
<upgrade cmd='cmd /c "%cygroot%\bin\mkgroup -ld > %cygroot%\etc\group"' /><br> <br><!-- do not use variables in remove commands <br> <remove cmd="cmd /c rmdir /s /q %cygroot% /> will FAIL --><br>
<br> <remove cmd="cmd /c rmdir /s /q C:\cygwin" /><br></package><br><br></packages><br>
</blockquote></div><br>