cvs: peardoc /en/chapters faq.xml /en/package/fileformats file-passwd.xml
| From: | Greg Beaver | Date: | Thu, 04 Nov 2004 03:03:56 +0000 |
| Subject: | cvs: peardoc /en/chapters faq.xml /en/package/fileformats file-passwd.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5076@lists.php.net to get a copy of this message | ||
cellog Wed Nov 3 22:03:56 2004 EDT
Modified files:
/peardoc/en/chapters faq.xml
/peardoc/en/package/fileformats file-passwd.xml
Log:
add an FAQ entry about "no releases found with state 'blah'"
remove the <?xml?> entry - without encoding it makes xmlspy blow up
http://cvs.php.net/diff.php/peardoc/en/chapters/faq.xml?r1=1.13&r2=1.14&ty=u Index: peardoc/en/chapters/faq.xml diff -u peardoc/en/chapters/faq.xml:1.13 peardoc/en/chapters/faq.xml:1.14 --- peardoc/en/chapters/faq.xml:1.13 Mon Apr 19 14:00:57 2004 +++ peardoc/en/chapters/faq.xml Wed Nov 3 22:03:55 2004 @@ -1,46 +1,82 @@ -<?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- [mj] The FAQ needs some heavy revision - don't translate it right now --> - <chapter id="faq"> - <title>FAQ - Frequently Asked Questions</title> - <titleabbrev>FAQ</titleabbrev> - - <sect1 id="faq.whatis"> - <title> +<chapter id="faq"> + <title>FAQ - Frequently Asked Questions</title> + <titleabbrev>FAQ</titleabbrev> + <sect1 id="faq.whatis"> + <title> What is PEAR? </title> - <para> - This is described <link linkend="introduction">here</link>. - </para> - </sect1> - - <sect1 id="faq.contributor"> - <title> - How to become a PEAR contributor and/or how to get CVS access to + <para> + This is described <link linkend="introduction">here</link>. + </para> + </sect1> + <sect1 id="faq.noreleasesfound"> + <title> + How do I install a package when I get the error message + "No release with state equal to: 'stable' found for 'Packagename'"? + </title> + <titleabbrev> + No release with state equal to: 'stable' found for 'Packagename' + </titleabbrev> + <simpara> + answer by Greg Beaver + </simpara> + <para> + The package in question does have releases, but none that are not stable. There are two solutions. + </para> + <para> + <orderedlist> + <listitem> + <para> + Set preferred_state to alpha or beta and then install + </para> + <para> + <command>$ pear config-set preferred_state alpha</command> + </para> + <para> + <command>$ pear install Packagename</command> + </para> + </listitem> + <listitem> + <para> + Find out the stability or version number of the latest release and install it directly. + </para> + <para> + <command>$ pear install Packagename-alpha</command> + </para> + <para> + <command>$ pear install Packagename-1.5.3</command> + </para> + </listitem> + </orderedlist> + </para> + </sect1> + <sect1 id="faq.contributor"> + <title> + How do I become a PEAR contributor and/or how do I get CVS access to PEAR? </title> - <titleabbrev> + <titleabbrev> Becoming contributor </titleabbrev> - <para> + <para> This is described <link linkend="developers.intro">here</link>. </para> - </sect1> - - <sect1 id="faq.c-module"> - <title> + </sect1> + <sect1 id="faq.c-module"> + <title> I have written a PHP module in C. What are the rules of including this in PEAR? </title> - <titleabbrev> + <titleabbrev> C-Modules </titleabbrev> - <simpara> + <simpara> Answer written by Stig Bakken and Martin Jansen. </simpara> - - <para> + <para> If you just want to make a simple extension that does not follow the <link linkend="standards">PEAR coding standards</link>, put it in pear/PECL/ extname (that is where extensions from @@ -48,8 +84,8 @@ following PEAR's function/class naming, put it in pear/Foo_Bar or whatever the right name is. </para> - </sect1> -<!-- + </sect1> + <!-- <sect1 id="faq.install-pecl"> <title> How do I install a PECL module written in C? @@ -116,19 +152,18 @@ </simpara> </sect1> --> - <sect1 id="faq.separated"> - <title> - Why is PEAR seperated into pear/ and php-src/pear/? + <sect1 id="faq.separated"> + <title> + Why is PEAR seperated into pear/ and pear-core/? </title> - <titleabbrev> - Why pear/ and php-src/pear? + <titleabbrev> + Why pear/ and pear-core/? </titleabbrev> - - <simpara> - The first elements of PEAR were stored in the directory php-src/pear + <simpara> + The first elements of PEAR were stored in the directory pear-core (once php-src/pear) and so they were bundled with each new PHP release. </simpara> - <simpara> + <simpara> For future releases of PEAR this isn't workable because PEAR will become too big to be bundled with every release of PHP. So there was a decision to commit all new elements to an own top level @@ -138,22 +173,19 @@ package manager code will be bundled with every new release automatically. </simpara> - </sect1> - - <sect1 id="faq.directory-structure"> - <title> - Why does the directory structure of pear/ and php-src/pear/ differ? + </sect1> + <sect1 id="faq.directory-structure"> + <title> + Why does the directory structure of pear/ and pear-core/ differ? </title> - <titleabbrev> - Why do pear/ and php-src/pear differ? + <titleabbrev> + Why do pear/ and pear-core/ differ? </titleabbrev> - - <simpara> + <simpara> Answer written by Stig Bakken. </simpara> - - <para> - The directory structure of <filename>php-src/pear/</filename> + <para> + The directory structure of <filename>pear-core/</filename> matches that of the install tree (by default <filename>/usr/local/lib/php</filename>), and are organized as a simple hierarchy. However, the directory structure of @@ -162,21 +194,18 @@ completely independent from where they end up being installed, this is all determined by the package description file. </para> - </sect1> - - <sect1 id="faq.flat-structure"> - <title> + </sect1> + <sect1 id="faq.flat-structure"> + <title> Why a flat directory structure instead of a deep? </title> - <titleabbrev> + <titleabbrev> Flat structure </titleabbrev> - - <simpara> + <simpara> Answer written by Stig Bakken. </simpara> - - <simpara> + <simpara> In CVS, PEAR code is organized by package instead of hierarchical like it would finally be installed. For example, if you want to use the XML_RPC class, you include "XML/RPC.php". It's easy to @@ -187,121 +216,115 @@ (package.xml) is used to say where the files should finally be installed. </simpara> - <simpara> + <simpara> The reason CVS is organized this way is that it makes package administration much easier. </simpara> - </sect1> - - <sect1 id="faq.unstable-code"> - <title> + </sect1> + <sect1 id="faq.unstable-code"> + <title> Can I commit experimental/unstable stuff? </title> - <titleabbrev> + <titleabbrev> Unstable code </titleabbrev> - - <para> + <para> Yes. But make sure, that you mark up the experimental/unstable status of the project in the documentation. The best place to do this is in the <filename>package.xml</filename> in the - <status>-tag. + <state>-tag. The values for this tag are <variablelist> - <varlistentry> - <term>alpha</term> - <listitem> - <simpara> + <varlistentry> + <term>alpha</term> + <listitem> + <simpara> early stages of development, all things could change (API, behavoir) without notice, expect lots of bugs </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>beta</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>beta</term> + <listitem> + <simpara> API should normally not change, usable software, expect bugs </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>devel</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>devel</term> + <listitem> + <simpara> a release for other developers who want early access to test and give feedback, code quality may vary from pre-alpha to stable </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>stable</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>stable</term> + <listitem> + <simpara> the software was tested, the API fixed, the documentation wrote and is the recommended release for users and production enviroments </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>snapshot</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>snapshot</term> + <listitem> + <simpara> a CVS snapshot from a certain date </simpara> - </listitem> - </varlistentry> - </variablelist> - </para> - </sect1> - - <sect1 id="faq.add-examples"> - <title> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect1> + <sect1 id="faq.add-examples"> + <title> Am I expected to add examples and/or test files to my package and where to store them? </title> - <titleabbrev> + <titleabbrev> Adding examples </titleabbrev> - - <para> + <para> Examples are a good idea, especially when your class has a complex API. But examples are only a part of a documentation. Don't create examples instead of a documentation. You should store the documentation and the examples in a sub directory 'docs' of the package directory. </para> - <para> + <para> Test scripts are recommended when your class has to be compiled, requires special extentions/programs or needs correctly installed additional files (i.e. templates, graphics). Store them in sub directory called 'tests'. </para> - </sect1> - - <sect1 id="faq.competitive-packages"> - <title> + </sect1> + <sect1 id="faq.competitive-packages"> + <title> Are different packages or classes with similar features allowed? </title> - <titleabbrev> + <titleabbrev> Competitive code </titleabbrev> - - <simpara> + <simpara> There is no problem with competitive packages, but we want to avoid pollution with 10 template classes, 7 different mail classes, and 3 different layers for databases doing the same only with different function names. </simpara> - <para> + <para> First of all, do a reality check: Why do I want to commit a new package? Really bad answers are <quote>To see my name in PEAR</quote> or <quote>I didn't understand the API of the existing class</quote>. </para> - <para> + <para> A good reason for a new class is often, that you are missing a function, behaviour or speed in an existing implementation. In this case, you should take a look at this class, if it possible @@ -310,7 +333,7 @@ to add the required functionality without changing the basics of this class. </para> - <simpara> + <simpara> If you write a new class, try to keep API compatibility with existing classes as far as possible! If it isn't possible to keep the class compatible himself, try to create a wrapper class to @@ -318,135 +341,120 @@ time or memory, a wrapper class only has to keep compatibility and make migration easier. </simpara> - <para> - Committing a competitive class has to be announced on the <ulink - url="mailto:&email.pear.dev;">PEAR developers mailinglist</ulink>! + <para> + Committing a competitive class has to be announced on the <ulink url="mailto:&email.pear.dev;">PEAR developers mailinglist</ulink>! </para> - </sect1> - - <sect1 id="faq.question"> - <title> + </sect1> + <sect1 id="faq.question"> + <title> I have a question about PEAR. Where should I ask? </title> - <titleabbrev> + <titleabbrev> Asking questions </titleabbrev> - - <para> - <itemizedlist> - <listitem> - <para> + <para> + <itemizedlist> + <listitem> + <para> General questions about the usage of PEAR components should be posted to the mailing list <ulink url="mailto:&email.pear.general;">&email.pear.general;</ulink>. </para> - </listitem> - - <listitem> - <para> + </listitem> + <listitem> + <para> All technical discussions concerning the development of PEAR components should be posted to <ulink url="mailto:&email.pear.dev;"> &email.pear.dev;</ulink>. </para> - </listitem> - - <listitem> - <para> + </listitem> + <listitem> + <para> Question concerning the website can be sent to <ulink url="mailto:&email.pear.webmaster;"> &email.pear.webmaster;</ulink>. </para> - </listitem> - </itemizedlist> - </para> - <para> + </listitem> + </itemizedlist> + </para> + <para> Information on subscribing this mailing lists can be found <ulink url="&url.pear.support;">here</ulink>. </para> - <para> + <para> On all mailing lists mentioned above the language is english and the way you ask questions should always be polite :-). </para> - </sect1> - - <sect1 id="faq.require"> - <title> + </sect1> + <sect1 id="faq.require"> + <title> A required package includes a package, my package needs it too. Should I include it again? </title> - - <para> + <para> Yes. You should include every package, you need with <function>require_once</function> or <function>include_once </function>, also when it is included already by another package. </para> - </sect1> - - <sect1 id="faq.windows"> - <title> + </sect1> + <sect1 id="faq.windows"> + <title> Does PEAR work on windows? </title> - <titleabbrev> + <titleabbrev> PEAR & Windows </titleabbrev> - - <para> + <para> To make PEAR work on Windows, you simple need to add the PEAR installation dir (e.g. <filename>c:\php\pear</filename>) to the include_path directive in your <filename>php.ini</filename>. </para> - <simpara> + <simpara> Note: There are some classes (like Schedule/At.php), that do not work on Windows, because they use *nix specific commands. </simpara> - </sect1> - - <sect1 id="faq.licenses"> - <title> + </sect1> + <sect1 id="faq.licenses"> + <title> What licenses are allowed in PEAR/PECL? </title> - <titleabbrev> + <titleabbrev> Allowed licenses </titleabbrev> - <simpara> + <simpara> Answer written by Jan Lehnardt, Tomas V.V. Cox and Rasmus Lerdorf. </simpara> - - <para> + <para> Currently PEAR supports the following list of licenses: </para> - - <itemizedlist> - <listitem> - <simpara> + <itemizedlist> + <listitem> + <simpara> PHP License </simpara> - </listitem> - <listitem> - <simpara> + </listitem> + <listitem> + <simpara> Apache License </simpara> - </listitem> - <listitem> - <simpara> + </listitem> + <listitem> + <simpara> LGPL </simpara> - </listitem> - <listitem> - <simpara> + </listitem> + <listitem> + <simpara> BSD style </simpara> - </listitem> - </itemizedlist> - - <para> + </listitem> + </itemizedlist> + <para> Other licenses may be added to this list on a case-by-case - basis. Please get in touch with the <ulink - url="mailto:&email.pear.dev;">PEAR developers mailing list</ulink> + basis. Please get in touch with the <ulink url="mailto:&email.pear.dev;">PEAR developers mailing list</ulink> for this. </para> - - <para> + <para> For PECL extensions that are linked into PHP, the license must be compatible with the PHP license. That means you can not GPL a PECL extension or you would be violating the GPL. Note also that if @@ -454,29 +462,24 @@ violating the GPL. If you need to link against a GPL'ed library, get permission from the author of the library. </para> - - <para> + <para> To set the license of you PEAR/PECL package, put it in the head of all source code files of your package and also the type of it inside the <license> tag of your package description file (<filename>package.xml</filename>). </para> - - </sect1> - - <sect1 id="faq.tabs-vs-spaces"> - <title> + </sect1> + <sect1 id="faq.tabs-vs-spaces"> + <title> Why does the PEAR coding standard insist on space-only indentation? </title> - <titleabbrev> + <titleabbrev> Tabs vs. Spaces </titleabbrev> - - <simpara> + <simpara> Answer written by Stig Bakken. </simpara> - - <para> + <para> Using spaces and avoiding tabs is the only way to ensure that a piece of code is rendered consistently in all editors and viewers. Many editors render tabs as 4 spaces, and a lot of editors, @@ -492,8 +495,8 @@ <literallayout><![CDATA[printf("%s", $arg);]]></literallayout> - </para> - <para> + </para> + <para> Likewise, consider this code written with 8-space tabs: <literallayout><![CDATA[ if ($foo && @@ -505,53 +508,51 @@ <literallayout><![CDATA[ if ($foo && $bar) { }]]></literallayout> - </para> - <simpara> + </para> + <simpara> In a community like PEAR where people use lots of different systems and editors, using tabs simply doesn't work. People will end up doing whitespace commits fixing rendering in their editor, while breaking it for others. With only spaces it will look the same to everyone. </simpara> - <para> + <para> Jamie Zawinski has written a <ulink url="&url.tabs.vs.spaces;">piece on the subject too</ulink>. </para> - <para> + <para> There is also a tool called <ulink url="&url.astyle;"> Astyle</ulink> which can help you convert your code to the appropriate style. </para> - </sect1> - - <sect1 id="faq.translators-revision-tracking"> - <title> + </sect1> + <sect1 id="faq.translators-revision-tracking"> + <title> Is there a tool to help PEAR manual translators to track files changes? </title> - <titleabbrev> + <titleabbrev> Revision Tracking </titleabbrev> - <para> + <para> Working on the translations is not just translating an English file and commiting the results. Much of the work is needed to update the already translated ones, to get in sync with the content of the English files. To follow the modifications in the English tree, - you should <ulink - url="mailto:&email.pear.doc-subscribe;">subscribe to the PEAR + you should <ulink url="mailto:&email.pear.doc-subscribe;">subscribe to the PEAR documentation mailing list</ulink> to get CVS commit messages, or read the archives. If you never update your files, the translations can get useless. </para> - <simpara> + <simpara> Updating a foreign language file can get difficult, as you may not know when and who translated that file, so you may not know where you should look for the updates needed. We have one system for tracking the revisions and modification dates of the files in <literal>peardoc</literal>. </simpara> - <sect2 id="faq.translators.revcheck-comments"> - <title>The Revision Comments</title> - <para> + <sect2 id="faq.translators.revcheck-comments"> + <title>The Revision Comments</title> + <para> Instead of storing all responsibilities in a central file, the revision comment system stores them in the files they provide information about. Information about translator, revision numbers, and status information @@ -561,8 +562,8 @@ <programlisting> <!-- EN-Revision: 1.16 Maintainer: jane Status: ready --> </programlisting> - </para> - <para> + </para> + <para> We can see the revision number for the last english file used to update the translation (EN-Revision: 1.16), the translator cvs account name. @@ -573,7 +574,7 @@ convenient now, as there are more than 1300 files in the English tree. </para> - <para> + <para> Currently, all three fields (English revision, Maintainer, Status) are needed. Maintainer is intended to be a CVS user name, or some nickname without a space, status can be anything without a space. @@ -582,7 +583,7 @@ This is only updated when you edit the contents of the comment yourself. </para> - <para> + <para> You may see this as a good thing, but using these comments, you lose the quick look on the whole list of your files. @@ -601,15 +602,14 @@ so the script will only list the files corresponding to the given maintainer. </para> - <para> + <para> There are some optional extensions introduced for this script, to be available in this generated HTML page. This is why the <filename>translation.xml</filename> files are introduced. Here comes a simple <filename>translation.xml</filename> file for the imaginary xx language : - <programlisting> -<![CDATA[ + <programlisting><![CDATA[ <?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE translation SYSTEM "../dtds/translation.dtd"> @@ -639,8 +639,7 @@ </work-in-progress> </translation> -]]> - </programlisting> +]]></programlisting> In this file, you can add users without a CVS account, and can assign ready documents or work-in-progress files to them. The biggest advantage of using this addon is that all this information @@ -652,7 +651,7 @@ Assigning ready files may be needed if a time consuming update is in progress on that file. </para> - <para> + <para> There are two optional parameters you can add to a <file>, if you would like to record it: the <literal>date</literal> and <literal>revision</literal>. @@ -662,7 +661,7 @@ There is currently no fixed format for the <literal>date</literal> parameter. </para> - <para> + <para> Another addon to this system is just to give credit to all people who worked on one file, and not just the current maintainer. To achieve this goal, we added the credit comments. One credit comment in @@ -676,9 +675,9 @@ comments only affect the display of the translators table in <filename>revcheck.html</filename>. </para> - </sect2> - </sect1> - </chapter> + </sect2> + </sect1> +</chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/en/package/fileformats/file-passwd.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/en/package/fileformats/file-passwd.xml diff -u peardoc/en/package/fileformats/file-passwd.xml:1.1 peardoc/en/package/fileformats/file-passwd.xml:1.2 --- peardoc/en/package/fileformats/file-passwd.xml:1.1 Tue Jun 8 07:39:00 2004 +++ peardoc/en/package/fileformats/file-passwd.xml Wed Nov 3 22:03:56 2004 @@ -1,5 +1,4 @@ -<?xml version="1.0" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="package.fileformats.file-passwd"> <title>File_Passwd</title>
http://cvs.php.net/diff.php/peardoc/en/chapters/faq.xml?r1=1.13&r2=1.14&ty=u Index: peardoc/en/chapters/faq.xml diff -u peardoc/en/chapters/faq.xml:1.13 peardoc/en/chapters/faq.xml:1.14 --- peardoc/en/chapters/faq.xml:1.13 Mon Apr 19 14:00:57 2004 +++ peardoc/en/chapters/faq.xml Wed Nov 3 22:03:55 2004 @@ -1,46 +1,82 @@ -<?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- [mj] The FAQ needs some heavy revision - don't translate it right now --> - <chapter id="faq"> - <title>FAQ - Frequently Asked Questions</title> - <titleabbrev>FAQ</titleabbrev> - - <sect1 id="faq.whatis"> - <title> +<chapter id="faq"> + <title>FAQ - Frequently Asked Questions</title> + <titleabbrev>FAQ</titleabbrev> + <sect1 id="faq.whatis"> + <title> What is PEAR? </title> - <para> - This is described <link linkend="introduction">here</link>. - </para> - </sect1> - - <sect1 id="faq.contributor"> - <title> - How to become a PEAR contributor and/or how to get CVS access to + <para> + This is described <link linkend="introduction">here</link>. + </para> + </sect1> + <sect1 id="faq.noreleasesfound"> + <title> + How do I install a package when I get the error message + "No release with state equal to: 'stable' found for 'Packagename'"? + </title> + <titleabbrev> + No release with state equal to: 'stable' found for 'Packagename' + </titleabbrev> + <simpara> + answer by Greg Beaver + </simpara> + <para> + The package in question does have releases, but none that are not stable. There are two solutions. + </para> + <para> + <orderedlist> + <listitem> + <para> + Set preferred_state to alpha or beta and then install + </para> + <para> + <command>$ pear config-set preferred_state alpha</command> + </para> + <para> + <command>$ pear install Packagename</command> + </para> + </listitem> + <listitem> + <para> + Find out the stability or version number of the latest release and install it directly. + </para> + <para> + <command>$ pear install Packagename-alpha</command> + </para> + <para> + <command>$ pear install Packagename-1.5.3</command> + </para> + </listitem> + </orderedlist> + </para> + </sect1> + <sect1 id="faq.contributor"> + <title> + How do I become a PEAR contributor and/or how do I get CVS access to PEAR? </title> - <titleabbrev> + <titleabbrev> Becoming contributor </titleabbrev> - <para> + <para> This is described <link linkend="developers.intro">here</link>. </para> - </sect1> - - <sect1 id="faq.c-module"> - <title> + </sect1> + <sect1 id="faq.c-module"> + <title> I have written a PHP module in C. What are the rules of including this in PEAR? </title> - <titleabbrev> + <titleabbrev> C-Modules </titleabbrev> - <simpara> + <simpara> Answer written by Stig Bakken and Martin Jansen. </simpara> - - <para> + <para> If you just want to make a simple extension that does not follow the <link linkend="standards">PEAR coding standards</link>, put it in pear/PECL/ extname (that is where extensions from @@ -48,8 +84,8 @@ following PEAR's function/class naming, put it in pear/Foo_Bar or whatever the right name is. </para> - </sect1> -<!-- + </sect1> + <!-- <sect1 id="faq.install-pecl"> <title> How do I install a PECL module written in C? @@ -116,19 +152,18 @@ </simpara> </sect1> --> - <sect1 id="faq.separated"> - <title> - Why is PEAR seperated into pear/ and php-src/pear/? + <sect1 id="faq.separated"> + <title> + Why is PEAR seperated into pear/ and pear-core/? </title> - <titleabbrev> - Why pear/ and php-src/pear? + <titleabbrev> + Why pear/ and pear-core/? </titleabbrev> - - <simpara> - The first elements of PEAR were stored in the directory php-src/pear + <simpara> + The first elements of PEAR were stored in the directory pear-core (once php-src/pear) and so they were bundled with each new PHP release. </simpara> - <simpara> + <simpara> For future releases of PEAR this isn't workable because PEAR will become too big to be bundled with every release of PHP. So there was a decision to commit all new elements to an own top level @@ -138,22 +173,19 @@ package manager code will be bundled with every new release automatically. </simpara> - </sect1> - - <sect1 id="faq.directory-structure"> - <title> - Why does the directory structure of pear/ and php-src/pear/ differ? + </sect1> + <sect1 id="faq.directory-structure"> + <title> + Why does the directory structure of pear/ and pear-core/ differ? </title> - <titleabbrev> - Why do pear/ and php-src/pear differ? + <titleabbrev> + Why do pear/ and pear-core/ differ? </titleabbrev> - - <simpara> + <simpara> Answer written by Stig Bakken. </simpara> - - <para> - The directory structure of <filename>php-src/pear/</filename> + <para> + The directory structure of <filename>pear-core/</filename> matches that of the install tree (by default <filename>/usr/local/lib/php</filename>), and are organized as a simple hierarchy. However, the directory structure of @@ -162,21 +194,18 @@ completely independent from where they end up being installed, this is all determined by the package description file. </para> - </sect1> - - <sect1 id="faq.flat-structure"> - <title> + </sect1> + <sect1 id="faq.flat-structure"> + <title> Why a flat directory structure instead of a deep? </title> - <titleabbrev> + <titleabbrev> Flat structure </titleabbrev> - - <simpara> + <simpara> Answer written by Stig Bakken. </simpara> - - <simpara> + <simpara> In CVS, PEAR code is organized by package instead of hierarchical like it would finally be installed. For example, if you want to use the XML_RPC class, you include "XML/RPC.php". It's easy to @@ -187,121 +216,115 @@ (package.xml) is used to say where the files should finally be installed. </simpara> - <simpara> + <simpara> The reason CVS is organized this way is that it makes package administration much easier. </simpara> - </sect1> - - <sect1 id="faq.unstable-code"> - <title> + </sect1> + <sect1 id="faq.unstable-code"> + <title> Can I commit experimental/unstable stuff? </title> - <titleabbrev> + <titleabbrev> Unstable code </titleabbrev> - - <para> + <para> Yes. But make sure, that you mark up the experimental/unstable status of the project in the documentation. The best place to do this is in the <filename>package.xml</filename> in the - <status>-tag. + <state>-tag. The values for this tag are <variablelist> - <varlistentry> - <term>alpha</term> - <listitem> - <simpara> + <varlistentry> + <term>alpha</term> + <listitem> + <simpara> early stages of development, all things could change (API, behavoir) without notice, expect lots of bugs </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>beta</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>beta</term> + <listitem> + <simpara> API should normally not change, usable software, expect bugs </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>devel</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>devel</term> + <listitem> + <simpara> a release for other developers who want early access to test and give feedback, code quality may vary from pre-alpha to stable </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>stable</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>stable</term> + <listitem> + <simpara> the software was tested, the API fixed, the documentation wrote and is the recommended release for users and production enviroments </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term>snapshot</term> - <listitem> - <simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>snapshot</term> + <listitem> + <simpara> a CVS snapshot from a certain date </simpara> - </listitem> - </varlistentry> - </variablelist> - </para> - </sect1> - - <sect1 id="faq.add-examples"> - <title> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect1> + <sect1 id="faq.add-examples"> + <title> Am I expected to add examples and/or test files to my package and where to store them? </title> - <titleabbrev> + <titleabbrev> Adding examples </titleabbrev> - - <para> + <para> Examples are a good idea, especially when your class has a complex API. But examples are only a part of a documentation. Don't create examples instead of a documentation. You should store the documentation and the examples in a sub directory 'docs' of the package directory. </para> - <para> + <para> Test scripts are recommended when your class has to be compiled, requires special extentions/programs or needs correctly installed additional files (i.e. templates, graphics). Store them in sub directory called 'tests'. </para> - </sect1> - - <sect1 id="faq.competitive-packages"> - <title> + </sect1> + <sect1 id="faq.competitive-packages"> + <title> Are different packages or classes with similar features allowed? </title> - <titleabbrev> + <titleabbrev> Competitive code </titleabbrev> - - <simpara> + <simpara> There is no problem with competitive packages, but we want to avoid pollution with 10 template classes, 7 different mail classes, and 3 different layers for databases doing the same only with different function names. </simpara> - <para> + <para> First of all, do a reality check: Why do I want to commit a new package? Really bad answers are <quote>To see my name in PEAR</quote> or <quote>I didn't understand the API of the existing class</quote>. </para> - <para> + <para> A good reason for a new class is often, that you are missing a function, behaviour or speed in an existing implementation. In this case, you should take a look at this class, if it possible @@ -310,7 +333,7 @@ to add the required functionality without changing the basics of this class. </para> - <simpara> + <simpara> If you write a new class, try to keep API compatibility with existing classes as far as possible! If it isn't possible to keep the class compatible himself, try to create a wrapper class to @@ -318,135 +341,120 @@ time or memory, a wrapper class only has to keep compatibility and make migration easier. </simpara> - <para> - Committing a competitive class has to be announced on the <ulink - url="mailto:&email.pear.dev;">PEAR developers mailinglist</ulink>! + <para> + Committing a competitive class has to be announced on the <ulink url="mailto:&email.pear.dev;">PEAR developers mailinglist</ulink>! </para> - </sect1> - - <sect1 id="faq.question"> - <title> + </sect1> + <sect1 id="faq.question"> + <title> I have a question about PEAR. Where should I ask? </title> - <titleabbrev> + <titleabbrev> Asking questions </titleabbrev> - - <para> - <itemizedlist> - <listitem> - <para> + <para> + <itemizedlist> + <listitem> + <para> General questions about the usage of PEAR components should be posted to the mailing list <ulink url="mailto:&email.pear.general;">&email.pear.general;</ulink>. </para> - </listitem> - - <listitem> - <para> + </listitem> + <listitem> + <para> All technical discussions concerning the development of PEAR components should be posted to <ulink url="mailto:&email.pear.dev;"> &email.pear.dev;</ulink>. </para> - </listitem> - - <listitem> - <para> + </listitem> + <listitem> + <para> Question concerning the website can be sent to <ulink url="mailto:&email.pear.webmaster;"> &email.pear.webmaster;</ulink>. </para> - </listitem> - </itemizedlist> - </para> - <para> + </listitem> + </itemizedlist> + </para> + <para> Information on subscribing this mailing lists can be found <ulink url="&url.pear.support;">here</ulink>. </para> - <para> + <para> On all mailing lists mentioned above the language is english and the way you ask questions should always be polite :-). </para> - </sect1> - - <sect1 id="faq.require"> - <title> + </sect1> + <sect1 id="faq.require"> + <title> A required package includes a package, my package needs it too. Should I include it again? </title> - - <para> + <para> Yes. You should include every package, you need with <function>require_once</function> or <function>include_once </function>, also when it is included already by another package. </para> - </sect1> - - <sect1 id="faq.windows"> - <title> + </sect1> + <sect1 id="faq.windows"> + <title> Does PEAR work on windows? </title> - <titleabbrev> + <titleabbrev> PEAR & Windows </titleabbrev> - - <para> + <para> To make PEAR work on Windows, you simple need to add the PEAR installation dir (e.g. <filename>c:\php\pear</filename>) to the include_path directive in your <filename>php.ini</filename>. </para> - <simpara> + <simpara> Note: There are some classes (like Schedule/At.php), that do not work on Windows, because they use *nix specific commands. </simpara> - </sect1> - - <sect1 id="faq.licenses"> - <title> + </sect1> + <sect1 id="faq.licenses"> + <title> What licenses are allowed in PEAR/PECL? </title> - <titleabbrev> + <titleabbrev> Allowed licenses </titleabbrev> - <simpara> + <simpara> Answer written by Jan Lehnardt, Tomas V.V. Cox and Rasmus Lerdorf. </simpara> - - <para> + <para> Currently PEAR supports the following list of licenses: </para> - - <itemizedlist> - <listitem> - <simpara> + <itemizedlist> + <listitem> + <simpara> PHP License </simpara> - </listitem> - <listitem> - <simpara> + </listitem> + <listitem> + <simpara> Apache License </simpara> - </listitem> - <listitem> - <simpara> + </listitem> + <listitem> + <simpara> LGPL </simpara> - </listitem> - <listitem> - <simpara> + </listitem> + <listitem> + <simpara> BSD style </simpara> - </listitem> - </itemizedlist> - - <para> + </listitem> + </itemizedlist> + <para> Other licenses may be added to this list on a case-by-case - basis. Please get in touch with the <ulink - url="mailto:&email.pear.dev;">PEAR developers mailing list</ulink> + basis. Please get in touch with the <ulink url="mailto:&email.pear.dev;">PEAR developers mailing list</ulink> for this. </para> - - <para> + <para> For PECL extensions that are linked into PHP, the license must be compatible with the PHP license. That means you can not GPL a PECL extension or you would be violating the GPL. Note also that if @@ -454,29 +462,24 @@ violating the GPL. If you need to link against a GPL'ed library, get permission from the author of the library. </para> - - <para> + <para> To set the license of you PEAR/PECL package, put it in the head of all source code files of your package and also the type of it inside the <license> tag of your package description file (<filename>package.xml</filename>). </para> - - </sect1> - - <sect1 id="faq.tabs-vs-spaces"> - <title> + </sect1> + <sect1 id="faq.tabs-vs-spaces"> + <title> Why does the PEAR coding standard insist on space-only indentation? </title> - <titleabbrev> + <titleabbrev> Tabs vs. Spaces </titleabbrev> - - <simpara> + <simpara> Answer written by Stig Bakken. </simpara> - - <para> + <para> Using spaces and avoiding tabs is the only way to ensure that a piece of code is rendered consistently in all editors and viewers. Many editors render tabs as 4 spaces, and a lot of editors, @@ -492,8 +495,8 @@ <literallayout><![CDATA[printf("%s", $arg);]]></literallayout> - </para> - <para> + </para> + <para> Likewise, consider this code written with 8-space tabs: <literallayout><![CDATA[ if ($foo && @@ -505,53 +508,51 @@ <literallayout><![CDATA[ if ($foo && $bar) { }]]></literallayout> - </para> - <simpara> + </para> + <simpara> In a community like PEAR where people use lots of different systems and editors, using tabs simply doesn't work. People will end up doing whitespace commits fixing rendering in their editor, while breaking it for others. With only spaces it will look the same to everyone. </simpara> - <para> + <para> Jamie Zawinski has written a <ulink url="&url.tabs.vs.spaces;">piece on the subject too</ulink>. </para> - <para> + <para> There is also a tool called <ulink url="&url.astyle;"> Astyle</ulink> which can help you convert your code to the appropriate style. </para> - </sect1> - - <sect1 id="faq.translators-revision-tracking"> - <title> + </sect1> + <sect1 id="faq.translators-revision-tracking"> + <title> Is there a tool to help PEAR manual translators to track files changes? </title> - <titleabbrev> + <titleabbrev> Revision Tracking </titleabbrev> - <para> + <para> Working on the translations is not just translating an English file and commiting the results. Much of the work is needed to update the already translated ones, to get in sync with the content of the English files. To follow the modifications in the English tree, - you should <ulink - url="mailto:&email.pear.doc-subscribe;">subscribe to the PEAR + you should <ulink url="mailto:&email.pear.doc-subscribe;">subscribe to the PEAR documentation mailing list</ulink> to get CVS commit messages, or read the archives. If you never update your files, the translations can get useless. </para> - <simpara> + <simpara> Updating a foreign language file can get difficult, as you may not know when and who translated that file, so you may not know where you should look for the updates needed. We have one system for tracking the revisions and modification dates of the files in <literal>peardoc</literal>. </simpara> - <sect2 id="faq.translators.revcheck-comments"> - <title>The Revision Comments</title> - <para> + <sect2 id="faq.translators.revcheck-comments"> + <title>The Revision Comments</title> + <para> Instead of storing all responsibilities in a central file, the revision comment system stores them in the files they provide information about. Information about translator, revision numbers, and status information @@ -561,8 +562,8 @@ <programlisting> <!-- EN-Revision: 1.16 Maintainer: jane Status: ready --> </programlisting> - </para> - <para> + </para> + <para> We can see the revision number for the last english file used to update the translation (EN-Revision: 1.16), the translator cvs account name. @@ -573,7 +574,7 @@ convenient now, as there are more than 1300 files in the English tree. </para> - <para> + <para> Currently, all three fields (English revision, Maintainer, Status) are needed. Maintainer is intended to be a CVS user name, or some nickname without a space, status can be anything without a space. @@ -582,7 +583,7 @@ This is only updated when you edit the contents of the comment yourself. </para> - <para> + <para> You may see this as a good thing, but using these comments, you lose the quick look on the whole list of your files. @@ -601,15 +602,14 @@ so the script will only list the files corresponding to the given maintainer. </para> - <para> + <para> There are some optional extensions introduced for this script, to be available in this generated HTML page. This is why the <filename>translation.xml</filename> files are introduced. Here comes a simple <filename>translation.xml</filename> file for the imaginary xx language : - <programlisting> -<![CDATA[ + <programlisting><![CDATA[ <?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE translation SYSTEM "../dtds/translation.dtd"> @@ -639,8 +639,7 @@ </work-in-progress> </translation> -]]> - </programlisting> +]]></programlisting> In this file, you can add users without a CVS account, and can assign ready documents or work-in-progress files to them. The biggest advantage of using this addon is that all this information @@ -652,7 +651,7 @@ Assigning ready files may be needed if a time consuming update is in progress on that file. </para> - <para> + <para> There are two optional parameters you can add to a <file>, if you would like to record it: the <literal>date</literal> and <literal>revision</literal>. @@ -662,7 +661,7 @@ There is currently no fixed format for the <literal>date</literal> parameter. </para> - <para> + <para> Another addon to this system is just to give credit to all people who worked on one file, and not just the current maintainer. To achieve this goal, we added the credit comments. One credit comment in @@ -676,9 +675,9 @@ comments only affect the display of the translators table in <filename>revcheck.html</filename>. </para> - </sect2> - </sect1> - </chapter> + </sect2> + </sect1> +</chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/peardoc/en/package/fileformats/file-passwd.xml?r1=1.1&r2=1.2&ty=u Index: peardoc/en/package/fileformats/file-passwd.xml diff -u peardoc/en/package/fileformats/file-passwd.xml:1.1 peardoc/en/package/fileformats/file-passwd.xml:1.2 --- peardoc/en/package/fileformats/file-passwd.xml:1.1 Tue Jun 8 07:39:00 2004 +++ peardoc/en/package/fileformats/file-passwd.xml Wed Nov 3 22:03:56 2004 @@ -1,5 +1,4 @@ -<?xml version="1.0" ?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="package.fileformats.file-passwd"> <title>File_Passwd</title>