[wpkg-users] logical not with OS type?

Stefan Pendl stefan.pendl.71 at gmail.com
Mon Jan 16 16:14:43 CET 2012


Am 16.01.2012 15:43, schrieb David Petterson:
> As I understood you, I should create a dummy package that includes the
> real package like this:
> (dummy file names in this example)
>
> <package id="test" name="Test" revision="1" reboot="false" priority="100">
> <include package-id="test2">
> <condition>
> <check type="logical" condition="not">
> <check type="host" condition="os" value="5\.2\.\d{4}"/>
> </check>
> </condition>
> </include>
> </package>
>

No, there is no need for a dummy package you can add this to the profile 
and use the package node instead of the include node.

I was just lazy and copied an example of mine.

>
> I have tried it on my testcomputer running XP 32 bit, but nothing gets
> installed. However, WPKG thinks that the install was successful.
> I also tried to reverse the logic with an "and" and changed the value to
> what I found on the page:
> http://wpkg.org/Extended_host_attribute_matching
> But the end result was the same.
>

The install of the dummy package will always succeed, since there are no 
checks included.

I would only use a dummy package, if I like to apply one package to 
multiple hosts, but install different releases based on some conditions.

The full package I have copied this from was:

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

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

     <include package-id="JRE6" os="5\.0\.\d{4}"/>

     <include package-id="JRE7">
         <condition>
             <check type="logical" condition="not">
                 <check type="host" condition="os" value="5\.0\.\d{4}"/>
             </check>
         </condition>
     </include>
</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