<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I have just committed a big patch I have been working on for the past couple of days. This new features allows the creation of user-defined boolean variables from within installer files, which can be referenced with a simple evaluation language to create complex conditional expressions.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Basically this allows for very fine-grained control over what files get installed. My main motivation for this at first was to have an easy way to automatically install GTK 1.x or 2.x binaries. This system is advanced enough to make the previous "arch", glibc, etc. filters obsolete.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'll just post here the relevant entry from README.xml :</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The BOOL element :</DIV><DIV>  </DIV><DIV>This element allows the user to create some complex expressions to guide the</DIV><DIV>installer. This element allows the user to define boolean conditions, the values of</DIV><DIV>which are defined by arbritrary scripts. These booleans can then be used as part</DIV><DIV>of expressions used by other elements, like FILE or BINARY below, to define conditions.</DIV><DIV>            </DIV><DIV>This element must be a direct child of the root INSTALL element. Booleans are global </DIV><DIV>to a particular instance of the installer. Additionally, the installer itself defines</DIV><DIV>a set of standard booleans, as described below.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Booleans are intended to replace the previous filtering mechanisms, using "arch", "libc"</DIV><DIV>and so on attributes, while providing additional flexibility.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Booleans are case sensitive.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The BOOL element takes one mandatory attribute :</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>  name      The symbolic name for the boolean (variable name). May be up to 30 characters</DIV><DIV>            long, and must start with an alphanumerical character. May not contain blank</DIV><DIV>            spaces.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Additionally, one of the following attributes must be used :</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>  script    The command to be run to determine the value of the boolean. In the UNIX</DIV><DIV>            tradition, it should return 0 for a TRUE value.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>  envvar    The name of an environment variable to query for the value of the boolean.</DIV><DIV>            The value must be a non-zero number to map to be TRUE. If the variable is not</DIV><DIV>            set in the environment, the boolean will likewise be set to FALSE.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>It also recognizes two optional attributes :</DIV><DIV>  </DIV><DIV>  later     If set to "yes", the script will be executed at the time that the condition</DIV><DIV>            referencing it is evaluated. The default is to run the script once immediately</DIV><DIV>            upon initialization to gather the static value.</DIV><DIV>  </DIV><DIV>  if        Additionally make this boolean dependent on another boolean expression. This</DIV><DIV>            expression can reference any previously defined boolean. See below for more details</DIV><DIV>            about the syntax. If this expression evaluates to FALSE, then the script won't be</DIV><DIV>            run, or the environment queried, and the value will also be set to FALSE.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Standard booleans defined by the installer :</DIV><DIV>- Standard 'true' and 'false' booleans. </DIV><DIV>- 'is-root' is TRUE if the installer is running as root.</DIV><DIV>- 'reinstalling' is TRUE if the product is already installed.</DIV><DIV>- 'bzip2' is TRUE if Bzip2 decompression is available in the installer. </DIV><DIV>- One boolean corresponding to the selected user interface: gtk1, gtk2, carbon, dialog, console</DIV><DIV>- One boolean for the CPU architecture: x86, ppc, sparc, alpha, etc</DIV><DIV>- One boolean for the detected libc version: libc5, glibc-2.1, etc.</DIV><DIV>- One boolean for the distribution / OS name : redhat, suse, aix, sco, etc.</DIV><DIV>- A boolean for the OS name as returned by uname.</DIV><DIV>- Two booleans representing the detection distribution version (not always meaningful) :</DIV><DIV>   distro-major-&lt;number&gt; and distro-minor-&lt;number&gt;.</DIV><DIV>= Booleans for the detected locale setting and its encoding, e.g. en_US, ISO-8859-1, etc.</DIV><DIV>- On Linux, 'selinux' indicates whether SELinux is available and enabled.</DIV><DIV>- If RPM support was compiled in, 'rpm-support' is set. If RPM 3.x, then 'rpm3-support' is</DIV><DIV>  also set to TRUE.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>For example, on a Redhat Linux 7.3 sytem, the following bools would be defined to TRUE :</DIV><DIV> Linux, x86, redhat, distro-major-7, distro-minor-3 </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>About Boolean Expressions :</DIV><DIV>  </DIV><DIV>Many elements support the 'if' or 'condition' attribute to reference complex expressions</DIV><DIV>using the Setup boolean variables. The expressions have to follow the following syntax:</DIV><DIV>  </DIV><DIV>expression := [!]&lt;operator&gt;(&lt;expression1&gt;,&lt;expression2&gt;) |</DIV><DIV>              [!]&lt;boolean name&gt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Supported operators are : + (logical "and"), | (logical "or"), and ^ (logical "exclusive or").</DIV><DIV>Any expression can be negated by a ! prefix.</DIV><DIV>An undefined boolean is the same as a false boolean.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Some examples :</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Match Fedora on PowerPC system:</DIV><DIV>   +(fedora,ppc)</DIV><DIV>Match one of SuSE, Redhat 9 or Fedora, on all but Intel:</DIV><DIV>  +(^(suse,+(redhat,distro-major-9),fedora),!x86)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">--</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Stéphane Peter</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><A href="mailto:megastep@megastep.org">megastep@megastep.org</A></FONT></P>  </DIV><BR></DIV></BODY></HTML>