summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>2010-01-10 02:27:54 +0100
committerDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>2010-01-10 02:27:54 +0100
commit16d166ff14de3af95153faf478023d18307e6d76 (patch)
treebc196064aa54b280398e46f760eb3c146bedb0d6
parentAdd missing use conditional code section (did I do that and lose it?). (diff)
downloaddevmanual-16d166ff14de3af95153faf478023d18307e6d76.tar.gz
devmanual-16d166ff14de3af95153faf478023d18307e6d76.tar.bz2
devmanual-16d166ff14de3af95153faf478023d18307e6d76.zip
Add Common Mistakes section.
Against use a variablelist rather than subsections for a single paragraph. The alternative would have been formal paragraphs but this reads better.
-rw-r--r--chunk.toc1
-rw-r--r--content/ebuild-writing.xmli1
-rw-r--r--content/ebuild-writing/common-mistakes.xmli54
3 files changed, 56 insertions, 0 deletions
diff --git a/chunk.toc b/chunk.toc
index 49c47d5..6ea0660 100644
--- a/chunk.toc
+++ b/chunk.toc
@@ -37,6 +37,7 @@
<d:tocentry linkend="ebuild-writing.using-eclasses"><?dbhtml filename="ebuild-writing/using-eclasses.html"?></d:tocentry>
<d:tocentry linkend="ebuild-writing.functions"><?dbhtml filename="ebuild-writing/functions.html"?></d:tocentry>
<d:tocentry linkend="ebuild-writing.misc-files"><?dbhtml filename="ebuild-writing/misc-files.html"?></d:tocentry>
+ <d:tocentry linkend="ebuild-writing.common-mistakes"><?dbhtml filename="ebuild-writing/common-mistaks.html"?></d:tocentry>
</d:tocentry>
</d:tocentry>
</toc>
diff --git a/content/ebuild-writing.xmli b/content/ebuild-writing.xmli
index a0e6a28..b4322a3 100644
--- a/content/ebuild-writing.xmli
+++ b/content/ebuild-writing.xmli
@@ -21,5 +21,6 @@
<xi:include parse="xml" href="ebuild-writing/using-eclasses.xmli" />
<xi:include parse="xml" href="ebuild-writing/functions.xmli" />
<xi:include parse="xml" href="ebuild-writing/misc-files.xmli" />
+ <xi:include parse="xml" href="ebuild-writing/common-mistakes.xmli" />
</chapter>
diff --git a/content/ebuild-writing/common-mistakes.xmli b/content/ebuild-writing/common-mistakes.xmli
new file mode 100644
index 0000000..e2f6c28
--- /dev/null
+++ b/content/ebuild-writing/common-mistakes.xmli
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<section xmlns="http://docbook.org/ns/docbook"
+ xmlns:xl="http://www.w3.org/1999/xlink"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xml:id="ebuild-writing.common-mistakes">
+ <title>Common Mistakes</title>
+
+ <para>
+ This section contains information on the common mistakes developers make when writing ebuilds.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term>
+ Invalid use of <varname>static</varname> use-flag
+ </term>
+
+ <listitem>
+ <para>
+ The <varname>static</varname> use-flag should only be used to make a binary use static linking instead of
+ dynamic linking. It should not be used to make a library install static libraries. The package should always
+ (if possible) install both the dynamic and static libraries.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ Referencing the full path to documentation files that could be compressed
+ </term>
+
+ <listitem>
+ <para>
+ When printing out to the users where to find files like INSTALL, do not specify the full path since
+ <varname>PORTAGE_COMPRESS</varname> comes into play. The file could be compressed with
+ <command>gzip</command>, <command>bzip2</command>, or some other random compression tool. So, instead of
+ doing this:
+ </para>
+
+ <programlisting language="ebuild"><![CDATA[
+elog "They are listed in /usr/share/doc/${PF}/INSTALL.gz"
+]]></programlisting>
+
+ <para>
+ Do something like:
+ </para>
+
+ <programlisting language="ebuild"><![CDATA[
+elog "They are listed in the INSTALL file in /usr/share/doc/${PF}"
+]]></programlisting>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</section>