svn: /pear/peardoc/trunk/en/guide/users/ dependencytracking.xml
[email protected] (Christian Weiske)
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
cweiske Thu, 03 Sep 2009 20:16:37 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288005
Log:
fix ken's dependency tracking guide. old lazy boy\!
Changed paths:
U pear/peardoc/trunk/en/guide/users/dependencytracking.xml
svn-diffs-288005.txt
(text/x-diff, 10.9 KB)
Modified: pear/peardoc/trunk/en/guide/users/dependencytracking.xml
===================================================================
--- pear/peardoc/trunk/en/guide/users/dependencytracking.xml 2009-09-03 19:16:50 UTC (rev 288004)
+++ pear/peardoc/trunk/en/guide/users/dependencytracking.xml 2009-09-03 20:16:37 UTC (rev 288005)
@@ -1,69 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
-<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="lillet" xml:id="guide.users.dependencytracking">
- <info><title>Dependency Tracking (Meta Packages) with PEAR</title></info>
+<chapter
+ xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink" version="lillet"
+ xml:id="guide.users.dependencytracking"
+>
+ <info>
+ <title>Dependency Tracking (Meta Packages) with PEAR</title>
+ </info>
- <para>
- The PEAR installer can be used for tracking project dependencies with a simple
- package definition file, without having to describe the entire project in that file.
- </para>
+ <para>
+ The PEAR installer can be used for tracking project dependencies with a simple
+ package definition file, without having to describe the entire project in
+ that file.
+ </para>
+ <para>
+ This can be done, for example, to ensure that a specified set of PEAR packages
+ are installed on both a development environment, into a test environment and
+ finally into a production environment with minimum fuss.
+ </para>
+
+ <para>
+ Another reason for using pear to track dependencies is to reduce the amount of
+ work required when trying to do this work manually: checking to see if a new
+ release that may add required functionality, close security issues or
+ include bug fixes can take time. Add a
+ few more packages and interdependencies in to the mix and the
+ amount of work grows exponentially.
+ </para>
+
+ <para>
+ The PEAR installer can take care of all of this for you.
+ You just need to tell it what you want.
+ </para>
+
+ <section xml:id="guide.users.dependencytracking.whattodo">
+ <title>What to do</title>
+ <para>
+ The logical steps for creating a package definition file, typically named
+ package.xml, that describes the dependencies required by your project are:
+ </para>
+ <orderedlist>
+ <listitem>
<para>
- This can be done, for example, to ensure that a specified set of PEAR packages
- are installed on both a development environment, into a test environment and
- finally into a production environment with minimum fuss.
+ List what you need -
+ Include in this details such as what channels the packages are to be
+ installed from and whether you only very specific versions of those packages
+ to be installed, or if you want to specify what the minimum versions of the
+ packages should be.
</para>
-
+ </listitem>
+ <listitem>
<para>
- Another reason for using pear to track dependencies is to reduce the amount of
- work required when trying to do this work manually: checking to see if a new
- release that may add required functionality, close security issues or include bug fixes can take time. Add a
- few more packages and interdependencies in to the mix and the amount of work grows exponentially.
+ Create a package.xml including these packages as it's manifest.
</para>
-
+ </listitem>
+ <listitem>
<para>
- The PEAR installer can take care of all of this for you. You just need to tell it what you want.
+ Test that it works
</para>
+ </listitem>
+ </orderedlist>
- <section xml:id="guide.users.dependencytracking.whattodo">
- <title>What to do</title>
- <para>
- The logical steps for creating a package definition file, typically named
- package.xml, that describes the dependencies required by your project are:
+ </section>
- <orderedlist>
- <listitem>
- List what you need -
- Include in this details such as what channels the packages are to be
- installed from and whether you only very specific versions of those packages
- to be installed, or if you want to specify what the minimum versions of the
- packages should be.
- </listitem>
- <listitem>
- Create a package.xml including these packages as it's manifest.
- </listitem>
- <listitem>
- Test that it works
- </listitem>
- </orderedlist>
- </para>
- </section>
+ <section xml:id="guide.users.dependencytracking.generatingalist">
+ <title>Generating a list of what's needed</title>
+ <para>
+ Assuming you want to replicate a subset of [pear] packages that are on one
+ machine and you wish to install that same set on another machine, this is one
+ suggested way to get the required details:
+ Use the output of "$ pear info -a" to determine the names of the packages,
+ which versions are installed and what channels they were installed from.
+ </para>
+ <para>
+ For example (edited for brevity):
+ </para>
- <section xml:id="guide.users.dependencytracking.generatingalist">
- <title>Generating a list of what's needed</title>
- <para>
- Assuming you want to replicate a subset of [pear] packages that are on one
- machine and you wish to install that same set on another machine, this is one
- suggested way to get the required details:
- Use the output of "$ pear info -a" to determine the names of the packages,
- which versions are installed and what channels they were installed from.
- </para>
- <para>
- For example (edited for brevity):
- </para>
-
- <para>
-<screen>
-<![CDATA[
+ <para>
+ <screen><![CDATA[
Installed packages, channel doc.php.net:
========================================
Package Version State
@@ -87,69 +102,65 @@
Package Version State
PHPUnit 3.3.16 stable
phpcpd 1.1.1 stable
-]]>
-</screen>
- </para>
- </section>
+]]></screen>
+ </para>
+ </section>
- <section xml:id="guide.users.dependencytracking.generatingpackagexml">
- <title>Writing/Generating the package.xml</title>
- <para>
- The package.xml can be generated using the pfm tool or in your favourite text editor.
- It's your call really.
- </para>
+ <section xml:id="guide.users.dependencytracking.generatingpackagexml">
+ <title>Writing/Generating the package.xml</title>
+ <para>
+ The package.xml can be generated using the pfm tool or
+ in your favourite text editor.
+ It's your call really.
+ </para>
- <para>
- The pfm tool can be installed via:
-<screen>
-<![CDATA[
+ <para>
+ The pfm tool can be installed via:
+ <screen><![CDATA[
$pear install PEAR_PackageFileManager_Cli
-]]>
-</screen>
- </para>
+]]></screen>
+ </para>
- <section xml:id="guide.users.dependencytracking.generatingpackagexml">
- <title>Creating package.xml Using PFM</title>
- <para>
- pfm is a commandline tool that analyses the contents of a project directory and creates a package.xml describing what it has found.
- Because we don't want to install any project specific files we're going to cheat in order to keep the generated package.xml as small as possible.
- </para>
+ <section xml:id="guide.users.dependencytracking.generatingpackagexml.pfm">
+ <title>Creating package.xml Using PFM</title>
+ <para>
+ pfm is a commandline tool that analyses the contents
+ of a project directory and creates a
+ package.xml describing what it has found.
+ Because we don't want to install any project specific files
+ we're going to cheat in order to keep the generated
+ package.xml as small as possible.
+ </para>
- <para>
- Begin by creating an empty directory and then moving into it:
- </para>
+ <para>
+ Begin by creating an empty directory and then moving into it:
+ </para>
- <para>
-<screen>
-<![CDATA[
+ <para>
+ <screen><![CDATA[
kguest:~$ cd MyProject-packages
/home/kguest/MyProject-packages
-]]>
-</screen>
- </para>
+]]></screen>
+ </para>
- <para>
- then create an empty php file:
- </para>
+ <para>
+ then create an empty php file:
+ </para>
- <para>
-<screen>
-<![CDATA[
+ <para>
+ <screen><![CDATA[
kguest:~/MyProject-packages$ touch empty.php
-]]>
-</screen>
- </para>
+]]></screen>
+ </para>
+ <para>
+ Download and save this package.xml into this new directory; then run pfm.
+ </para>
- <para>
- Download and save this package.xml into this new directory; then run pfm.
- </para>
-
- <para>
-<screen>
-<![CDATA[
+ <para>
+ <screen><![CDATA[
kguest:~/MyProject-packages$ wget package.xml
kguest:~/MyProject-packages$ pfm
@@ -228,29 +239,33 @@
Dependencies:
Required Package dependency "PHP_CodeSniffer" - pear.php.net
-]]>
-</screen>
- </para>
+]]></screen>
+ </para>
- <para>
- Repeat this as required until all packages that you want to be managed have been added; then return to the main menu, save and quit.
- Naturally, you should also use pfm to change the name of the project described by package.xml to something of your choosing.
- </para>
+ <para>
+ Repeat this as required until all packages that you want to
+ be managed have been added; then return to the main menu, save and quit.
+ Naturally, you should also use pfm to change the name of the
+ project described by package.xml to something of your choosing.
+ </para>
- </section>
- <section xml:id="guide.users.dependencytracking.generatingpackagexml.editor">
- <title>Creating package.xml Using Text Editor</title>
- <para>
- Download the package.xml file from above. Use this as a template and refer to
- the <link linkend="guide.developers.package2.tags.xml">tag reference for version 2 of package.xml</link> in the developers section for
- details of how to add dependencies to the file.
- </para>
- </section>
- </section>
- <section xml:id="guide.users.dependencytracking.testinstall">
- <title>Testing that the package works - install it</title>
- <para>
- foo bar
- </para>
- </section>
-</section>
+ </section>
+
+ <section xml:id="guide.users.dependencytracking.generatingpackagexml.editor">
+ <title>Creating package.xml Using Text Editor</title>
+ <para>
+ Download the package.xml file from above. Use this as a template
+ and refer to
+ the <link linkend="guide.developers.package2.tags">tag reference
+ for version 2 of package.xml</link> in the developers section for
+ details of how to add dependencies to the file.
+ </para>
+ </section>
+ </section>
+ <section xml:id="guide.users.dependencytracking.testinstall">
+ <title>Testing that the package works - install it</title>
+ <para>
+ foo bar
+ </para>
+ </section>
+</chapter>