priaonehaha / wpkgexpress

Automatically exported from code.google.com/p/wpkgexpress
GNU General Public License v3.0
0 stars 0 forks source link

conditionnal check - xml not properly formatted #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a "and" locgical check 
2. Add a "not" logical check in it
3. A wrong </condition> balise appears

Here is the package produced by wpkgexpress r12

    <package id="polices" name="polices" revision="2" priority="5"
reboot="false">
        <check type="logical" condition="and">
            <check type="file" condition="exists"
path="%WINDIR%\Fonts\STIXNonUniBolIta.otf" />
            <check type="file" condition="exists"
path="%WINDIR%\Fonts\LinLibertine_BI-4.0.5.ttf" />
            <check type="logical" condition="not">
                <check type="file" condition="exists"
path="%windir%\fonts\cmsy10.ttf" />

            </condition>
        </check>
        <install cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\polices\*.*"
"%WINDIR%\Fonts\" ' timeout="300" />
        <install cmd="%comspec% /c del  /Q /S /F %windir%\fonts\cmex10.ttf
%windir%\fonts\cmmi10.ttf %windir%\fonts\cmr10.ttf
%windir%\fonts\cmsy10.ttf" timeout="60" />
        <upgrade cmd='%COMSPEC% /c copy /Y "%SOFTWARE%\polices\*.*"
"%WINDIR%\Fonts\" ' timeout="300" />
        <upgrade cmd="%comspec% /c del /Q /S /F %windir%\fonts\cmex10.ttf
%windir%\fonts\cmmi10.ttf %windir%\fonts\cmr10.ttf
%windir%\fonts\cmsy10.ttf" timeout="60" />
    </package>

Checks are well formatted in the UI, but xml is false

Original issue reported on code.google.com by nlebrun...@gmail.com on 6 Feb 2010 at 1:59

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by msc...@gmail.com on 26 Feb 2010 at 3:05

GoogleCodeExporter commented 9 years ago
This patch fixes the problem of the superfluous </conditional> tag (for me, at 
least).

Original comment by esch...@gmail.com on 15 May 2010 at 12:40

Attachments:

GoogleCodeExporter commented 9 years ago
The patch is OK for me too ...

I suggest you do the same in wpkgexpress/views/packages/xml/view.ctp

Thks a lot !

Original comment by nlebrun...@gmail.com on 15 May 2010 at 8:01

GoogleCodeExporter commented 9 years ago
Stupid question: how does one access the xml view template?  I'd rather not 
push out a 
patch until I can make sure it works :)

Original comment by esch...@gmail.com on 17 May 2010 at 5:26

GoogleCodeExporter commented 9 years ago
how does one access the xml view template? 

When you're in a package page, 
 https://webserver/wpkgexpress/packages/view/61

You can see the package by appending .xml 
 https://webserver/wpkgexpress/packages/view/61.xml

But i don't know if it's use somewhere else ...

Your patch is a workaround, but it does work for me too

Original comment by nlebrun...@gmail.com on 18 May 2010 at 5:32

GoogleCodeExporter commented 9 years ago
Thanks for the tip!  Here's an updated version of the patch:

Original comment by esch...@gmail.com on 18 May 2010 at 5:45

Attachments: