[wpkg-users] Virtual package?

Stefan Pendl stefan.pendl.71 at gmail.com
Sat Nov 1 11:32:12 CET 2014


Am 31.10.2014 um 10:02 schrieb Marco Gaiarin:
> Mandi! heiko.helmle at horiba.com
>    In chel di` si favelave...
>
>> I'm not sure if <depend> can be made conditional (with included <condition>) -
>> but if it does then you might be able to cook some soft dependencies out of
>> this.
> This is exactly what i'm asking for. I've looked at wiki and changelog,
> but i was not able to determine if <depends /> can be made conditional.
> Looking at the code, but i'm not a JS programmer, seems no. ;(
>
>
> Also, i've thinked a bit about it, but i've not found a way to use
> check conditions to ''mimic'' dependencies...
>

I do have "virtual" packages that have execute set to once, they only 
contain include directives.
All these packages are just used to include the correct release of a 
software that does not support all Windows versions I use.
Sure you can do this within the profiles too.
If you need to maintain multiple revisions of a software other software 
is depending on, it is easier to do this inside of the package 
definition of the software, so you only need to change one file and not 
host, profile and package files.
Some examples below.

'---code start (watch for line wraps)

     <package id="Java" name="Java" revision="2014.10.04"
         reboot="false" priority="10" execute="once">

         <include package-id="JRE6" os="5\.0\.\d{4}"/>
         <include package-id="JRE8">
             <condition>
                 <check type="logical" condition="not">
                     <check type="host" condition="os" value="5\.0\.\d{4}"/>
                 </check>
             </condition>
         </include>
     </package>

     <package
             id="AdobeReader"
             name="Adobe Reader"
             revision="2013.02.16"
             reboot="false"
             priority="10"
             execute="once">

         <!-- install version 9 on Windows 2000 -->
         <include package-id="AdobeReader9" os="5\.0\.\d{4}"/>

         <!-- install version 11 on Windows XP and above -->
         <include package-id="AdobeReader11">
             <condition>
                 <check type="logical" condition="not">
                     <check type="host" condition="os" value="5\.0\.\d{4}"/>
                 </check>
             </condition>
         </include>
     </package>

     <package
             id="AdobeFlashPlayer"
             name="Adobe Flash Player"
             revision="2014.10.04"
             reboot="false"
             priority="10"
             execute="once">

         <!-- install version 10 on Windows 2000 -->
         <include package-id="AdobeFlashPlayer10" os="5\.0\.\d{4}"/>

         <!-- install version 15 on Windows XP and higher -->
         <include package-id="AdobeFlashPlayer15" os="(5\.[1-9]|6\.\d)\.\d{4}" />
     </package>

     <package
             id="VLCplayer"
             name="VideoLAN Client Player"
             revision="2012.02.20"
             reboot="false"
             priority="10"
             execute="once">

         <!-- install version 1 on Windows 2000 -->
         <include package-id="VLCplayer1"  os="5\.0\.\d{4}"/>

         <!-- install version 2 on Windows XP and above -->
         <include package-id="VLCplayer2" os="(5\.[1-9]|6\.\d)\.\d{4}"/>
     </package>

'---code end

--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?




More information about the wpkg-users mailing list