cvs: peardoc /en/guide/developers/package2 dependencies.xml
| From: | Greg Beaver | Date: | Sat, 19 Mar 2005 02:52:05 +0000 |
| Subject: | cvs: peardoc /en/guide/developers/package2 dependencies.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5696@lists.php.net to get a copy of this message | ||
cellog Fri Mar 18 21:52:05 2005 EDT
Added files:
/peardoc/en/guide/developers/package2 dependencies.xml
Log:
start docs for <dependencies>
http://cvs.php.net/co.php/peardoc/en/guide/developers/package2/dependencies.xml?r=1.1&p=1 Index: peardoc/en/guide/developers/package2/dependencies.xml +++ peardoc/en/guide/developers/package2/dependencies.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.developers.package2.dependencies"> <refnamediv> <refname><dependencies></refname> <refpurpose>Dependency Specification in package.xml 2.0</refpurpose> </refnamediv> <refsect1 id="guide.developers.package2.dependencies.intro"> <title>Introduction to dependencies in package.xml 2.0</title> <para> Dependencies are the most difficult aspect of programming. Using code written by other people can be a nightmare without simple ways to control bugs and API changes. Arguably, the handling of dependencies is PEAR's greatest strength, although there are many other nice features. Regardless of your personal opinion of the importance of dependencies, it is crucial to understand how to specify a dependency, and the different ways to ensure that your package is only used on systems that support it. </para> <para> In package.xml 1.0, dependencies were relatively simple, but at the cost of usefulness. Specifying a dependency on a package for applications was actually dangerous. If you wished to limit an installed version of a package to a single version, it would mean preventing upgrade at any cost. package.xml 2.0 provides a simple way to enforce stricter dependency versioning without making upgrades onerous. </para> <para> In package.xml 1.0, dependencies on PHP extensions like <ulink url="&url.pecl;">PECL</ulink> extensions was near to a disaster. Extensions had to be present in the php.ini and loaded in memory in order to validate as being installed. This is often impossible, as a different php.ini is used for a production website versus the php.ini used for the pear installer. With package.xml 2.0, dependencies on a PECL-like extension is simple and straightforward, and only requires that the package be installed, and not that the extension be present in memory, although an older style extension dependency is also supported. </para> <para> package.xml 1.0 supports two kinds of dependencies, required and optional. package.xml 2.0 also supports these two dependency types, but introduces a new kind of dependency concept: an optional dependency group. Dependency groups define a feature set. Instead of thinking "This package optionally depends on Net_FTP and optionally depends on Log" think "To remotely install packages, I need the remoteinstall feature, which needs Net_FTP and the Log package". This grouping allows defining sets of packages and extensions that comprise a feature and must be installed all at once for the feature to function properly. </para> <para> package.xml 1.0 only supported php, package, and extension dependencies. package.xml 2.0 supports dependencies on php, package, extension, os, architecture, and PEAR installer. In addition, package.xml 2.0 supports depending on a static package located at a url, and depending on a package that provides an extension to PHP like PECL packages. </para> <para> The PEAR installer dependency is not a dependency on the PEAR package, but a dependency on the currently running PEAR installer, and is more similar to a PHP dependency in that it requires the specified version to be running in memory. This is very useful for circumventing difficult bugs in the PEAR installer that render a package install useless. </para> <refsect2 id="guide.developers.package2.dependencies.structure"> <title>Structure of <dependencies></title> <para> The <dependencies> tag re-organizes dependencies into groups and "extracts" attributes into tags. It also un-abbreviates words for clarity and human-readability. The following excerpt of a package.xml version 1.0: </para> <para> <programlisting role="xml"> <![CDATA[ <deps> <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep> <dep type="php" rel="ge" version="4.2.0"/> <dep type="pkg" rel="has" optional="yes">PEAR_Frontend_Web</dep> </deps> ]]> </programlisting> </para> <para> Approximately translates into this format in package.xml 2.0: </para> <para> <programlisting role="xml"> <![CDATA[ <dependencies> <required> <pearinstaller> <min>1.4.0a7</min> </pearinstaller> <php> <min>4.2.0</min> <max>6.0.0</max> </php> <package> <name>Archive_Tar</name> <channel>pear.php.net</channel> <min>1.3.1</min> </package> </required> <optional> <package> <name>PEAR_Frontend_Web</name> <channel>pear.php.net</channel> </package> </optional> </dependencies> ]]> </programlisting> </para> <para> These changes were made to simplify xml validation and parsing. Note that unlike package.xml 1.0, the <pearinstaller> and <php> dependencies are required in all package.xml. In addition the <min> tag is required in <pearinstaller>, and both the <min> and <max> tags are required for <php> dependencies. </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.pearinstaller"> <title><pearinstaller> dependencies</title> <para> The <pearinstaller> dependency defines the minimum version of PEAR that can properly parse and install the package.xml containing it. As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of PEAR required to install this package.xml. This tag is required in all package.xml <pearinstaller> dependencies. </para> </listitem> <listitem> <para> <max> - maximum version of PEAR installer supported. Use with caution! This tag will prevent the package from being installed by anyone with a newer version of PEAR! </para> </listitem> <listitem> <para> <recommended> - recommended version of PEAR installer. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of PEAR installer. Use this to prevent the package from being installed by any PEAR version that cannot properly install the package. Multiple <exclude> tags may be used to exclude more than one version. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.php"> <title><php> dependencies</title> <para> As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of PHP required to install this package.xml. This tag is required in all package.xml <php> dependencies. </para> </listitem> <listitem> <para> <max> - maximum version of PHP supported. This tag is required in all package.xml <php> dependencies. </para> </listitem> <listitem> <para> <recommended> - recommended version of PHP. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of PHP. Use this to prevent the package from being installed by any PHP version that cannot properly work with the package. Multiple <exclude> tags may be used to exclude more than one version. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.subpackage"> <title><subpackage> dependencies</title> <para> Subpackage dependencies share the same xml format as package dependencies. The subpackage dependency should only be used if a package is split into more than one package. In other words, if the child package contains the same files as any earlier version of the parent package, the child package would normally conflict with the parent package because it would be attempting to overwrite the parent package's files with its own files. </para> <para> A simple example should make this clear. Package Foo 1.0.0 contains Foo.php and Foo/Bar.php. Package Foo's developers decide to split Foo into two packages: Foo and Foo_Bar. Foo 1.1.0 contains foo.php, and Foo_Bar 0.1.0 contains Foo/Bar.php. Foo_Bar 0.1.0 conflicts directly with Foo 1.0.0, as both contain the file Foo/Bar.php. </para> <para> If Foo has a subpackage dependency on Foo_Bar, then the installer will ignore the conflict between Foo 1.0.0's Foo/Bar.php and Foo_Bar 0.1.0's Foo/Bar.php just as it ignores the conflict between Foo 1.0.0's Foo.php and Foo 1.1.0's Foo.php. </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.package"> <title><package> dependencies</title> <para> Understandably, the <package> dependency is PEAR's most complex dependency. PEAR 1.4.0 supports 3 different kinds of package dependencies: </para> <para> <orderedlist> <listitem> <para> Normal, traditional channel server-based package dependencies (same idea as package.xml 1.0). </para> </listitem> <listitem> <para> Dependencies on packages that provide PHP extensions (like <ulink url="&url.pecl;">PECL</ulink> packages). (These can be both server-based and uri-based dependencies) </para> </listitem> <listitem> <para> Static, non-traditional uri-based package dependencies. </para> </listitem> </orderedlist> </para> <para> Let's look at the third kind of package dependency first. Here is a simple example: </para> <para> <programlisting role="xml"> <![CDATA[ <package> <name>Foo<name> <uri>http://www.example.com/Foo-1.3.0</uri> </package> ]]> </programlisting> </para> <para> This dependency tells the installer to fetch http://www.example.com/Foo-1.3.0.tgz or http://www.example.com/Foo-1.3.0.tar (both must be available!) if the package Foo is not installed. All uri packages must contain a <link linkend="guide.developers.package2.uri"><uri></link> tag rather than a <link linkend="guide.developers.package2.channel"><channel></link> tag and will automatically belong to the pseudo-channel "__uri", but that is not important to the discussion of how to format the xml to create the uri-based package dependency. </para> <para> uri-based package dependencies cannot contain any versioning information, as this is irrelevant: there is only one version possible with a static uri. uri-based dependencies can contain the <conflicts/> tag to specify an absolute conflict with the package, and the <providesextension> tag to specify an extension provided by the static package. </para> <para> The channel server-based packages and PHP extension dependency documentation is not yet finished, but will be soon. </para> <para> As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of a dependency. If the dependency package is installed, and is older than this version, installation will fail. </para> </listitem> <listitem> <para> <max> - maximum version of a dependency. If the dependency package is installed, and is newer than this version, installation will fail. </para> </listitem> <listitem> <para> <recommended> - recommended version of a dependency. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> <para> Note that use of the <link linkend="guide.developers.package2.compatible"><compatible></link> tag in the dependency's package.xml can be used to circumvent the installer's strictness. In essence, the <compatible> tag tells the installer that a dependent package is compatible with the current package, even though it is not the recommended version. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of a package. Multiple <exclude> tags may be used to exclude more than one version of a dependency. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.extension"> <title><extension> dependencies</title> <para> As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of PHP extension to install this package.xml. </para> </listitem> <listitem> <para> <max> - maximum version of PHP extension supported. </para> </listitem> <listitem> <para> <recommended> - recommended version of PHP extension. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of PHP extension. Multiple <exclude> tags may be used to exclude more than one version. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.os"> <title><os> dependencies</title> <para> The OS dependency is used to restrict a package to both a particular class of OSes (like unix) and to a specific OS (like darwin, or freebsd). Here is an example: </para> <para> <programlisting role="xml"> <![CDATA[ <os> <name>linux</name> </os> ]]> </programlisting> </para> <para> To specify that a package can be installed on every OS except the one specified, use the <conflicts/> tag: </para> <para> <programlisting role="xml"> <![CDATA[ <os> <name>windows</name> <conflicts/> </os> ]]> </programlisting> </para> <para> Possible OS values are: <itemizedlist> <listitem><simpara>windows</simpara></listitem> <listitem><simpara>unix</simpara></listitem> <listitem><simpara>linux</simpara></listitem> <listitem><simpara>freebsd</simpara></listitem> <listitem><simpara>darwin (use for Mac OS X)</simpara></listitem> <listitem><simpara>sunos</simpara></listitem> <listitem><simpara>irix</simpara></listitem> <listitem><simpara>hpux</simpara></listitem> <listitem><simpara>aix</simpara></listitem> </itemizedlist> </para> <para> In addition, any esoteric OS that supports the <ulink url="&url.php;php_uname"><function>php_uname</function></ulink> function can be used. Note that the "unix" OS is defined as any of linux, freebsd, darwin, sunos, irix, hpux, or aix. </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.arch"> <title><arch> dependencies</title> <para> The arch dependency is used to restrict a package to a specific os and processor architecture. Here is an example: </para> <para> <programlisting role="xml"> <![CDATA[ <arch> <pattern>linux-*-i386-*</pattern> </arch> ]]> </programlisting> </para> <para> To specify that a package can be installed on every architecture except the one specified, use the <conflicts/> tag: </para> <para> <programlisting role="xml"> <![CDATA[ <arch> <pattern>linux-*-i?86-*</pattern> <conflicts/> </arch> ]]> </programlisting> </para> <para> The arch pattern is defined by the <function>OS_Guess-<matchSignature</function> method, and is as follows: sysname[-release[-cpu[-extra]]]. All segments within [] are optional, and the wildcard "*" can be used in all segments instead of a value. In addition, the "?" wildcard can be used to specify a single character that can match any value. i?86 will match i386, i686, i586 and so on. </para> <para> sysname is the same as the os dependency, except unix is not supported. </para> <para> release is the version of the operating system. </para> <para> cpu is the specific cpu, and is typically i?86, sparc, powerpc. </para> <para> extra is any other stuff on the end of <function>php_uname</function>, including the glibc version </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 -->
http://cvs.php.net/co.php/peardoc/en/guide/developers/package2/dependencies.xml?r=1.1&p=1 Index: peardoc/en/guide/developers/package2/dependencies.xml +++ peardoc/en/guide/developers/package2/dependencies.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.developers.package2.dependencies"> <refnamediv> <refname><dependencies></refname> <refpurpose>Dependency Specification in package.xml 2.0</refpurpose> </refnamediv> <refsect1 id="guide.developers.package2.dependencies.intro"> <title>Introduction to dependencies in package.xml 2.0</title> <para> Dependencies are the most difficult aspect of programming. Using code written by other people can be a nightmare without simple ways to control bugs and API changes. Arguably, the handling of dependencies is PEAR's greatest strength, although there are many other nice features. Regardless of your personal opinion of the importance of dependencies, it is crucial to understand how to specify a dependency, and the different ways to ensure that your package is only used on systems that support it. </para> <para> In package.xml 1.0, dependencies were relatively simple, but at the cost of usefulness. Specifying a dependency on a package for applications was actually dangerous. If you wished to limit an installed version of a package to a single version, it would mean preventing upgrade at any cost. package.xml 2.0 provides a simple way to enforce stricter dependency versioning without making upgrades onerous. </para> <para> In package.xml 1.0, dependencies on PHP extensions like <ulink url="&url.pecl;">PECL</ulink> extensions was near to a disaster. Extensions had to be present in the php.ini and loaded in memory in order to validate as being installed. This is often impossible, as a different php.ini is used for a production website versus the php.ini used for the pear installer. With package.xml 2.0, dependencies on a PECL-like extension is simple and straightforward, and only requires that the package be installed, and not that the extension be present in memory, although an older style extension dependency is also supported. </para> <para> package.xml 1.0 supports two kinds of dependencies, required and optional. package.xml 2.0 also supports these two dependency types, but introduces a new kind of dependency concept: an optional dependency group. Dependency groups define a feature set. Instead of thinking "This package optionally depends on Net_FTP and optionally depends on Log" think "To remotely install packages, I need the remoteinstall feature, which needs Net_FTP and the Log package". This grouping allows defining sets of packages and extensions that comprise a feature and must be installed all at once for the feature to function properly. </para> <para> package.xml 1.0 only supported php, package, and extension dependencies. package.xml 2.0 supports dependencies on php, package, extension, os, architecture, and PEAR installer. In addition, package.xml 2.0 supports depending on a static package located at a url, and depending on a package that provides an extension to PHP like PECL packages. </para> <para> The PEAR installer dependency is not a dependency on the PEAR package, but a dependency on the currently running PEAR installer, and is more similar to a PHP dependency in that it requires the specified version to be running in memory. This is very useful for circumventing difficult bugs in the PEAR installer that render a package install useless. </para> <refsect2 id="guide.developers.package2.dependencies.structure"> <title>Structure of <dependencies></title> <para> The <dependencies> tag re-organizes dependencies into groups and "extracts" attributes into tags. It also un-abbreviates words for clarity and human-readability. The following excerpt of a package.xml version 1.0: </para> <para> <programlisting role="xml"> <![CDATA[ <deps> <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep> <dep type="php" rel="ge" version="4.2.0"/> <dep type="pkg" rel="has" optional="yes">PEAR_Frontend_Web</dep> </deps> ]]> </programlisting> </para> <para> Approximately translates into this format in package.xml 2.0: </para> <para> <programlisting role="xml"> <![CDATA[ <dependencies> <required> <pearinstaller> <min>1.4.0a7</min> </pearinstaller> <php> <min>4.2.0</min> <max>6.0.0</max> </php> <package> <name>Archive_Tar</name> <channel>pear.php.net</channel> <min>1.3.1</min> </package> </required> <optional> <package> <name>PEAR_Frontend_Web</name> <channel>pear.php.net</channel> </package> </optional> </dependencies> ]]> </programlisting> </para> <para> These changes were made to simplify xml validation and parsing. Note that unlike package.xml 1.0, the <pearinstaller> and <php> dependencies are required in all package.xml. In addition the <min> tag is required in <pearinstaller>, and both the <min> and <max> tags are required for <php> dependencies. </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.pearinstaller"> <title><pearinstaller> dependencies</title> <para> The <pearinstaller> dependency defines the minimum version of PEAR that can properly parse and install the package.xml containing it. As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of PEAR required to install this package.xml. This tag is required in all package.xml <pearinstaller> dependencies. </para> </listitem> <listitem> <para> <max> - maximum version of PEAR installer supported. Use with caution! This tag will prevent the package from being installed by anyone with a newer version of PEAR! </para> </listitem> <listitem> <para> <recommended> - recommended version of PEAR installer. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of PEAR installer. Use this to prevent the package from being installed by any PEAR version that cannot properly install the package. Multiple <exclude> tags may be used to exclude more than one version. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.php"> <title><php> dependencies</title> <para> As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of PHP required to install this package.xml. This tag is required in all package.xml <php> dependencies. </para> </listitem> <listitem> <para> <max> - maximum version of PHP supported. This tag is required in all package.xml <php> dependencies. </para> </listitem> <listitem> <para> <recommended> - recommended version of PHP. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of PHP. Use this to prevent the package from being installed by any PHP version that cannot properly work with the package. Multiple <exclude> tags may be used to exclude more than one version. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.subpackage"> <title><subpackage> dependencies</title> <para> Subpackage dependencies share the same xml format as package dependencies. The subpackage dependency should only be used if a package is split into more than one package. In other words, if the child package contains the same files as any earlier version of the parent package, the child package would normally conflict with the parent package because it would be attempting to overwrite the parent package's files with its own files. </para> <para> A simple example should make this clear. Package Foo 1.0.0 contains Foo.php and Foo/Bar.php. Package Foo's developers decide to split Foo into two packages: Foo and Foo_Bar. Foo 1.1.0 contains foo.php, and Foo_Bar 0.1.0 contains Foo/Bar.php. Foo_Bar 0.1.0 conflicts directly with Foo 1.0.0, as both contain the file Foo/Bar.php. </para> <para> If Foo has a subpackage dependency on Foo_Bar, then the installer will ignore the conflict between Foo 1.0.0's Foo/Bar.php and Foo_Bar 0.1.0's Foo/Bar.php just as it ignores the conflict between Foo 1.0.0's Foo.php and Foo 1.1.0's Foo.php. </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.package"> <title><package> dependencies</title> <para> Understandably, the <package> dependency is PEAR's most complex dependency. PEAR 1.4.0 supports 3 different kinds of package dependencies: </para> <para> <orderedlist> <listitem> <para> Normal, traditional channel server-based package dependencies (same idea as package.xml 1.0). </para> </listitem> <listitem> <para> Dependencies on packages that provide PHP extensions (like <ulink url="&url.pecl;">PECL</ulink> packages). (These can be both server-based and uri-based dependencies) </para> </listitem> <listitem> <para> Static, non-traditional uri-based package dependencies. </para> </listitem> </orderedlist> </para> <para> Let's look at the third kind of package dependency first. Here is a simple example: </para> <para> <programlisting role="xml"> <![CDATA[ <package> <name>Foo<name> <uri>http://www.example.com/Foo-1.3.0</uri> </package> ]]> </programlisting> </para> <para> This dependency tells the installer to fetch http://www.example.com/Foo-1.3.0.tgz or http://www.example.com/Foo-1.3.0.tar (both must be available!) if the package Foo is not installed. All uri packages must contain a <link linkend="guide.developers.package2.uri"><uri></link> tag rather than a <link linkend="guide.developers.package2.channel"><channel></link> tag and will automatically belong to the pseudo-channel "__uri", but that is not important to the discussion of how to format the xml to create the uri-based package dependency. </para> <para> uri-based package dependencies cannot contain any versioning information, as this is irrelevant: there is only one version possible with a static uri. uri-based dependencies can contain the <conflicts/> tag to specify an absolute conflict with the package, and the <providesextension> tag to specify an extension provided by the static package. </para> <para> The channel server-based packages and PHP extension dependency documentation is not yet finished, but will be soon. </para> <para> As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of a dependency. If the dependency package is installed, and is older than this version, installation will fail. </para> </listitem> <listitem> <para> <max> - maximum version of a dependency. If the dependency package is installed, and is newer than this version, installation will fail. </para> </listitem> <listitem> <para> <recommended> - recommended version of a dependency. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> <para> Note that use of the <link linkend="guide.developers.package2.compatible"><compatible></link> tag in the dependency's package.xml can be used to circumvent the installer's strictness. In essence, the <compatible> tag tells the installer that a dependent package is compatible with the current package, even though it is not the recommended version. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of a package. Multiple <exclude> tags may be used to exclude more than one version of a dependency. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.extension"> <title><extension> dependencies</title> <para> As with all dependency tags that support versioning, these 4 tags are supported to define versioning: </para> <para> <itemizedlist> <listitem> <para> <min> - minimum version of PHP extension to install this package.xml. </para> </listitem> <listitem> <para> <max> - maximum version of PHP extension supported. </para> </listitem> <listitem> <para> <recommended> - recommended version of PHP extension. This tag is used for strict version control. The installer will refuse to install a package without the --force option unless the version exactly matches recommended. This can be used to provide a level of extra security, as a package can be set to install using a version that is known to work without limiting future upgrades. </para> </listitem> <listitem> <para> <exclude> - incompatible versions of PHP extension. Multiple <exclude> tags may be used to exclude more than one version. </para> </listitem> </itemizedlist> </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.os"> <title><os> dependencies</title> <para> The OS dependency is used to restrict a package to both a particular class of OSes (like unix) and to a specific OS (like darwin, or freebsd). Here is an example: </para> <para> <programlisting role="xml"> <![CDATA[ <os> <name>linux</name> </os> ]]> </programlisting> </para> <para> To specify that a package can be installed on every OS except the one specified, use the <conflicts/> tag: </para> <para> <programlisting role="xml"> <![CDATA[ <os> <name>windows</name> <conflicts/> </os> ]]> </programlisting> </para> <para> Possible OS values are: <itemizedlist> <listitem><simpara>windows</simpara></listitem> <listitem><simpara>unix</simpara></listitem> <listitem><simpara>linux</simpara></listitem> <listitem><simpara>freebsd</simpara></listitem> <listitem><simpara>darwin (use for Mac OS X)</simpara></listitem> <listitem><simpara>sunos</simpara></listitem> <listitem><simpara>irix</simpara></listitem> <listitem><simpara>hpux</simpara></listitem> <listitem><simpara>aix</simpara></listitem> </itemizedlist> </para> <para> In addition, any esoteric OS that supports the <ulink url="&url.php;php_uname"><function>php_uname</function></ulink> function can be used. Note that the "unix" OS is defined as any of linux, freebsd, darwin, sunos, irix, hpux, or aix. </para> </refsect2> <refsect2 id="guide.developers.package2.dependencies.arch"> <title><arch> dependencies</title> <para> The arch dependency is used to restrict a package to a specific os and processor architecture. Here is an example: </para> <para> <programlisting role="xml"> <![CDATA[ <arch> <pattern>linux-*-i386-*</pattern> </arch> ]]> </programlisting> </para> <para> To specify that a package can be installed on every architecture except the one specified, use the <conflicts/> tag: </para> <para> <programlisting role="xml"> <![CDATA[ <arch> <pattern>linux-*-i?86-*</pattern> <conflicts/> </arch> ]]> </programlisting> </para> <para> The arch pattern is defined by the <function>OS_Guess-<matchSignature</function> method, and is as follows: sysname[-release[-cpu[-extra]]]. All segments within [] are optional, and the wildcard "*" can be used in all segments instead of a value. In addition, the "?" wildcard can be used to specify a single character that can match any value. i?86 will match i386, i686, i586 and so on. </para> <para> sysname is the same as the os dependency, except unix is not supported. </para> <para> release is the version of the operating system. </para> <para> cpu is the specific cpu, and is typically i?86, sparc, powerpc. </para> <para> extra is any other stuff on the end of <function>php_uname</function>, including the glibc version </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 -->