[wpkg-users] "new" behaviour since wpkg.js version 1.3.1

George jorgito1412 at gmail.com
Thu Aug 7 06:47:57 CEST 2014


Hi!

I wanted to report that I have encountered the same problem with the latest
version (v1.3.1).

In my case, I found that upgrading wpkg-gp did not work because the
variables defined in the profile were not being properly expanded:

--
<packages>

    <package id="WPKG-GP" name="WPKG-GP" revision="%version%">

        <variable name="version" value="0.17" />
        <variable name="EXE"
value="%SOFTWARE%\WPKG-GP\Wpkg-GP-%version%_x86.exe" architecture="x86" />
        <variable name="EXE"
value="%SOFTWARE%\WPKG-GP\Wpkg-GP-%version%_x64.exe" architecture="x64" />

        <check type="uninstall" condition="versiongreaterorequal"
path="Wpkg-GP %version% .*" value="%version%" />

        <install cmd="%EXE% /S /DisableViaLGP">
            <exit code="3010" reboot="delayed" />
        </install>

        <upgrade cmd="%EXE% /S /DisableViaLGP">
            <exit code="3010" reboot="delayed" />
        </upgrade>

    </package>

</packages>
--

%SOFTWARE% is defined in the profile and it is not properly expanded in
this case. The executed command ended up being
"%SOFTWARE%\WPKG-GP\Wpkg-GP-0.17_x86.exe"

As mentioned before, adding "cmd /c" to the beginning of the commands works
around the issue. Let me know if you need any addiotional information to
issue a proper fix.

Best regards and keep up the good work!! =D

George


On Fri, Jun 27, 2014 at 4:18 PM, Rainer Meier <r.meier at wpkg.org> wrote:
>
> Hi Holger,
>
> On 27.06.2014 13:35, Holger.Bauer at ricoh.de wrote:
> > With wpkg-version 1.3.0 this worked fine, but with version 1.3.1 I
receive an
> > error message.
> >
> > So I tried a few things and found out that I have to put a cmd /c into
the
> > installation command so that it looks like this:
> > <install cmd='cmd /c Netsh advfirewall firewall set rule
group="%EnableRDP%" new
> > enable=yes' />
> >
> > Another information: If I declare the variable in the package itself
the cmd /c
> > is not necessary and everything works as expected.
> >
> > Any ideas???
>
> I think this boils down to some variable substitution change. If you use
'cmd
> /c' then the variable %EnableRDP% is passed to cmd and finally expanded
by cmd.
> If you don't use 'cmd /c' prefix variable expansion entirely happens in
WPKG only.
>
> I will have to check whether any change in WPKG 1.3.1 lead to issues
expanding
> profile or host variables during command execution. But it sounds a
little
> strange that the expansion works properly if the variable is specified in
the
> package. Perhaps WPKG fails to apply host and profile variables before
executing
> the command. Especially strange since during execution of the command the
> variable seems to be defined (else cmd could also not expand it).
>
>
> I will certainly try to reproduce and report back.
>
>
> b,
> Rainer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20140807/f14d1339/attachment-0002.html>


More information about the wpkg-users mailing list