cvs: peardoc /en/guide/developers/package2 compatible.xml

From: Date: Sat, 19 Mar 2005 02:13:35 +0000
Subject: cvs: peardoc /en/guide/developers/package2 compatible.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5695@lists.php.net to get a copy of this message
cellog Fri Mar 18 21:13:35 2005 EDT Added files: /peardoc/en/guide/developers/package2 compatible.xml Log: add docs for <compatible> http://cvs.php.net/co.php/peardoc/en/guide/developers/package2/compatible.xml?r=1.1&p=1 Index: peardoc/en/guide/developers/package2/compatible.xml +++ peardoc/en/guide/developers/package2/compatible.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.developers.package2.compatible"> <refnamediv> <refname>&lt;compatible&gt;</refname> <refpurpose>Alleviating strict versioning with &lt;compatible&gt;</refpurpose> </refnamediv> <refsect1 id="guide.developers.package2.compatible.intro"> <title>Working with &lt;recommended&gt; dependency versions and &lt;compatible&gt;</title> <para> The &lt;compatible&gt; tag is designed to be used with a &lt;package&gt; dependency that contains a &lt;recommended&gt; version tag from package pear.example.com/Bar version 1.3.0 like so: </para> <para> <programlisting role="xml"> <![CDATA[ <package> <name>Foo</name> <channel>pear.example.com</channel> <min>1.0.0</min> <recommended>1.5.2</recommended> </package> ]]> </programlisting> </para> <para> The above dependency can be translated into English as follows: &quot;Use the package pear.example.com/Foo, but only versions 1.0.0 or newer. If pear.example.com/Foo is not installed, install version 1.5.2. If pear.example.com/Foo is installed and is not version 1.5.2, fail unless --force is specified, or pear.example.com/Foo is compatible with me.&quot; </para> <para> That last clause &quot;...or pear.example.com/Foo is compatible with me.&quot; is controlled by the &lt;compatible&gt; tag. If package Foo version 1.5.3's package.xml has a &lt;compatible&gt; like so: </para> <para> <programlisting role="xml"> <![CDATA[ <compatible> <name>Bar</name> <channel>pear.example.com</channel> <min>1.2.0</min> <max>1.3.0</max> <exclude>1.2.9</exclude> </compatible> ]]> </programlisting> </para> <para> This will instruct the installer that pear.example.com/Foo version 1.5.3 is compatible with pear.example.com/Bar versions 1.2.0 to 1.3.0 inclusive, but is not compatible with 1.2.9. </para> <para> It is very important to note that only <emphasis>existing</emphasis> versions that have been tested with the package should be mentioned in the &lt;compatible&gt; tag. Future versions of pear.example.com/Bar should simply upgrade the &lt;recommended&gt; tag. </para> <para> &lt;compatible&gt; may contain three versioning tags. The required &lt;min&gt; and &lt;max&gt; are used to define the range of tested and compatible versions, and &lt;exclude&gt; is used to exclude any versions within the range. In the example above, 1.3.0 and 1.2.0 are the highest and lowest versions that may be excluded. There can be an unlimited number of &lt;compatible&gt; tags inside a package.xml. </para> <refsect2> <title>See also:</title> <para> <link linkend="guide.developers.package2.dependencies.package">&lt;uri&gt;</link> </para> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.pear.doc (#5695) next »