[izpack-users] OS restrictions, matching criteria?
David Ferrero
david.ferrero at zion.com
Wed Jun 7 22:08:04 CEST 2006
Hi folks:
question regarding the OS restrictions element and attributes:
I was looking at the OsConstraint.java and noticed that it has a method:
/**
...
* @return true if one of the OsConstraints matched the current
system or constraint_list is
* null (no constraints), false if none of the OsConstraints matched
*/
public static boolean oneMatchesCurrentSystem(...)
I noticed this method is called during Unpacking (installation) and
is used to determine which packs, files, etc are installed...
The method's javadoc matches the source, however it seems like it
misses the goal of the xml. It seems we should be looking for
something like AND rather than OR...
For example if I have a file within a pack like:
<file src="dist/unix_service/server.sh" targetdir="$INSTALL_PATH/bin">
<os family="unix" name="Mac OS X" />
</file>
My intent is ONLY INSTALL THIS FILE ON a Mac OS X system. After
reviewing the OsConstraint.java methods, unless I am missing
something in the flow of the whole installer, it appears this FILE
will get copied if at least one matches (hence the method name)
os.family="unix" OR os.name="Mac OS X". I would think we really want
strict control such as os.family="unix" AND os.family="Mac OS X".
Comments?
On Oct 7, 2004, at 9:42 AM, Perez Carmona, David wrote:
> Hi,
>
> Another question.
>
> What specifies the os attribute of a fileset?. The os family, the
> os version or the os architecture?.
> I think the doc isn't clear enough.
> On the other hand the <os> tag has a lot of attributes for
> specifying this.
> I need to filter a fileset sometimes for the operating system name
> (Java property "os.name") and others for the family.
>
> If I create separate packs and use the <os> tag, it works ok. :-)
>
>> -----Mensaje original-----
>> De: izpack-users-admin at berlios.de
>> [mailto:izpack-users-admin at berlios.de]En nombre de Perez
>> Carmona, David
>> Enviado el: jueves, 07 de octubre de 2004 15:15
>> Para: IzUsr (E-mail)
>> Asunto: [izpack-users] fileset os attribute
>>
>>
>> Dear IzPackers,
>>
>> I have the following in the definition of a pack
>>
>> <pack name="Base" required="yes">
>> .....
>> <fileset targetdir="$INSTALL_PATH" dir="." os="Linux">
>> <include name="bin/linux/**"/>
>> </fileset>
>> </pack>
>>
>> and I install under Windows, and these files are copied.
>> Why? Is this a bug?
>>
>> Best regards
>>
>> David
>> _______________________________________________
>> izpack-users mailing list
>> izpack-users at lists.berlios.de
>> http://lists.berlios.de/mailman/listinfo/izpack-users
>>
> _______________________________________________
> izpack-users mailing list
> izpack-users at lists.berlios.de
> http://lists.berlios.de/mailman/listinfo/izpack-users
More information about the izpack-users
mailing list