* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-09-20 9:04 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-09-20 9:04 UTC (permalink / raw
To: gentoo-commits
ulm 09/09/20 09:04:54
Modified: dev-guide.xml
Log:
Convert lists of functions to dl.
Revision Changes Path
1.7 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.6&r2=1.7
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dev-guide.xml 19 Sep 2009 12:32:37 -0000 1.6
+++ dev-guide.xml 20 Sep 2009 09:04:54 -0000 1.7
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.6 2009/09/19 12:32:37 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.7 2009/09/20 09:04:54 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -27,8 +27,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.2.0</version>
-<date>2009-09-19</date>
+<version>1.2.1</version>
+<date>2009-09-20</date>
<chapter>
<title>Introduction</title>
@@ -286,51 +286,50 @@
These are implemented in <path>libs/core.bash</path>.
</p>
-<p><b>The die Function</b></p>
-
-<p>
- The <c>die</c> function (which, unlike its ebuild counterpart, <e>can</e> be
- called from within subshells) is used to exit with a fatal error. It should
- be invoked as <c>die -q "Message to display"</c>. If the <c>-q</c> is not
- provided, a stacktrace will be displayed – this should never happen because
- of user input error, only abnormal conditions.
-</p>
-
-<p><b>The check_do Function</b></p>
-
-<p>
- The <c>check_do</c> utility function checks that the first parameter is a
- function, and then calls it with any additional parameters as its arguments.
- If the function does not exist, <c>die</c> is called. Again, this is mostly
- internal.
-</p>
-
-<p><b>The do_action Function</b></p>
-
-<p>
- The <c>do_action</c> utility function is the correct way to call a utility
- function which is defined in another module. The first parameter is the
- action, additional parameters are passed as arguments.
-</p>
-
-<p><b>The inherit Function</b></p>
-
-<p>
- The <c>inherit</c> function sources eselect library files based on their
- name. In order to source the file <path>libs/foo.bash</path> you have to add
- <c>inherit foo</c> in global scope of your module.
-</p>
-
-<p><b>The sed Function</b></p>
-
-<p>
- The <c>sed</c> function is a wrapper around GNU <c>sed</c>.
-</p>
+<dl>
+ <dt>die</dt>
+ <dd>
+ The <c>die</c> function (which, unlike its ebuild counterpart,
+ <e>can</e> be called from within subshells) is used to exit with
+ a fatal error. It should be invoked as <c>die -q "Message to
+ display"</c>. If the <c>-q</c> is not provided, a stacktrace will
+ be displayed – this should never happen because of user input
+ error, only abnormal conditions.
+ </dd>
+
+ <dt>check_do</dt>
+ <dd>
+ The <c>check_do</c> utility function checks that the first
+ parameter is a function, and then calls it with any additional
+ parameters as its arguments. If the function does not exist,
+ <c>die</c> is called. Again, this is mostly internal.
+ </dd>
+
+ <dt>do_action</dt>
+ <dd>
+ The <c>do_action</c> utility function is the correct way to call
+ a utility function which is defined in another module. The first
+ parameter is the action, additional parameters are passed as
+ arguments.
+ </dd>
+
+ <dt>inherit</dt>
+ <dd>
+ The <c>inherit</c> function sources eselect library files based on
+ their name. In order to source the file <path>libs/foo.bash</path>
+ you have to add <c>inherit foo</c> in global scope of your module.
+ </dd>
+
+ <dt>sed</dt>
+ <dd>
+ The <c>sed</c> function is a wrapper around GNU <c>sed</c>.
+ </dd>
+</dl>
</body>
</section>
-<section>
+<section id="output">
<title>Output Utility Functions</title>
<body>
@@ -338,54 +337,71 @@
These are implemented in <path>libs/output.bash</path>
</p>
-<p><b>The write_error_msg Function</b></p>
-
-<p>
- The <c>write_error_msg</c> function displays an error message in the
- standard format. It is similar to <c>eerror</c>.
-</p>
-
-<p><b>The write_warning_msg Function</b></p>
-
-<p>
- The <c>write_warning_msg</c> function displays a warning message in the
- standard format. It is similar to <c>ewarn</c>.
-</p>
-
-<p><b>The write_list_ Function</b></p>
-
-<p>
- To display a list, the <c>write_list_</c> family of functions should be
- used. Lists should always start with a header, which can be displayed using
- <c>write_list_start The Header</c>.
-</p>
-
-<p>
- To display a numbered list, the <c>write_numbered_list_entry</c> function
- should be used for each item. The first parameter is the list item number,
- the second is the list item text (remember to quote this).
-</p>
-
-<p>
- To display a keyword/value list, the <c>write_kv_list_entry</c> function
- should be used. The first parameter is the key, the second the value.
-</p>
-
-<p>
- The <c>write_numbered_list</c> function is a wrapper around
- <c>write_numbered_list_entry</c> that handles the numbering automatically.
- Each parameter passed is displayed as a numbered list item, the first with
- index 1, the second with index 2 and so on. If <c>-p</c> is passed as the
- first argument to these functions, <e>plain</e> highlighting is used.
-</p>
-
-<p><b>The highlight Function</b></p>
-
-<p>
- The <c>highlight</c> utility function can be used to emphasise some text
- which is to be displayed by any of the above functions. A typical invocation
- might look like the code listing shown below.
-</p>
+<dl>
+ <dt>write_error_msg</dt>
+ <dd>
+ The <c>write_error_msg</c> function displays an error message in
+ the standard format. It is similar to <c>eerror</c>.
+ </dd>
+
+ <dt>write_warning_msg</dt>
+ <dd>
+ The <c>write_warning_msg</c> function displays a warning message
+ in the standard format. It is similar to <c>ewarn</c>.
+ </dd>
+
+ <dt>The write_list_ functions</dt>
+ <dd>
+ To display a list, the <c>write_list_</c> family of functions
+ should be used. Lists should always start with a header, which can
+ be displayed using <c>write_list_start The Header</c>.
+ </dd>
+
+ <dt>write_numbered_list_entry</dt>
+ <dd>
+ To display a numbered list, the <c>write_numbered_list_entry</c>
+ function should be used for each item. The first parameter is the
+ list item number, the second is the list item text (remember to
+ quote this).
+ </dd>
+
+ <dt>write_kv_list_entry</dt>
+ <dd>
+ To display a keyword/value list, the <c>write_kv_list_entry</c>
+ function should be used. The first parameter is the key, the
+ second the value.
+ </dd>
+
+ <dt>write_numbered_list</dt>
+ <dd>
+ The <c>write_numbered_list</c> function is a wrapper around
+ <c>write_numbered_list_entry</c> that handles the numbering
+ automatically. Each parameter passed is displayed as a numbered
+ list item, the first with index 1, the second with index 2 and
+ so on. If <c>-p</c> is passed as the first argument to these
+ functions, <e>plain</e> highlighting is used.
+ </dd>
+
+ <dt>highlight</dt>
+ <dd>
+ The <c>highlight</c> utility function can be used to emphasise
+ some text which is to be displayed by any of the above functions.
+ A typical invocation might look like the in the
+ <uri link="#output_pre1">code listing</uri> shown below.
+ </dd>
+
+ <dt>highlight_warning</dt>
+ <dd>
+ The <c>highlight_warning</c> function is like <c>highlight</c>,
+ but for warnings. It displays the text in question in red.
+ </dd>
+
+ <dt>space</dt>
+ <dd>
+ The <c>space</c> utility function takes a single integer
+ parameter. It displays that many space characters.
+ </dd>
+</dl>
<pre caption="highlight example">
write_list_start "This is $(highlight list) example"
@@ -394,20 +410,6 @@
write_kv_list_entry "Third" "$(highlight The end)"
</pre>
-<p><b>The highlight_warning Function</b></p>
-
-<p>
- The <c>highlight_warning</c> function is like <c>highlight</c>, but for
- warnings. It displays the text in question in red.
-</p>
-
-<p><b>The space Function</b></p>
-
-<p>
- The <c>space</c> utility function takes a single integer parameter. It
- displays that many space characters.
-</p>
-
</body>
</section>
@@ -419,27 +421,27 @@
These are implemented in <path>libs/tests.bash</path>.
</p>
-<p><b>The has Function</b></p>
-
-<p>
- The <c>has</c> utility function is like Portage's <c>hasq</c>. It returns
- true if and only if the first parameter is equal to any of the remaining
- parameters.
-</p>
-
-<p><b>The is_function Function</b></p>
-
-<p>
- The <c>is_function</c> utility function returns true if and only if its
- parameter exists and is a function. This is mostly used internally, but may
- have some use for modules.
-</p>
-
-<p><b>The is_number Function</b></p>
-
-<p>
- Returns true if and only if the parameter is a positive whole number.
-</p>
+<dl>
+ <dt>has</dt>
+ <dd>
+ The <c>has</c> utility function is like Portage's <c>hasq</c>.
+ It returns true if and only if the first parameter is equal to any
+ of the remaining parameters.
+ </dd>
+
+ <dt>is_function</dt>
+ <dd>
+ The <c>is_function</c> utility function returns true if and only
+ if its parameter exists and is a function. This is mostly used
+ internally, but may have some use for modules.
+ </dd>
+
+ <dt>is_number</dt>
+ <dd>
+ Returns true if and only if the parameter is a positive whole
+ number.
+ </dd>
+</dl>
</body>
</section>
@@ -452,31 +454,30 @@
These are implemented in <path>libs/path-manipulation</path>.
</p>
-<p><b>The basename Function</b></p>
-
-<p>
- The <c>basename</c> function is a transparent bash-only replacement for the
- external <c>basename</c> application.
-</p>
-
-<p><b>The dirname Function</b></p>
-
-<p>
- The <c>dirname</c> function is a transparent bash-only replacement for the
- external <c>dirname</c> application.
-</p>
-
-<p><b>The canonicalise Function</b></p>
-
-<p>
- The <c>canonicalise</c> function is a wrapper to either GNU
- <c>readlink -f</c> or <c>realpath</c>.
-</p>
+<dl>
+ <dt>basename</dt>
+ <dd>
+ The <c>basename</c> function is a transparent bash-only
+ replacement for the external <c>basename</c> application.
+ </dd>
+
+ <dt>dirname</dt>
+ <dd>
+ The <c>dirname</c> function is a transparent bash-only replacement
+ for the external <c>dirname</c> application.
+ </dd>
+
+ <dt>canonicalise</dt>
+ <dd>
+ The <c>canonicalise</c> function is a wrapper to either GNU
+ <c>readlink -f</c> or <c>realpath</c>.
+ </dd>
+</dl>
</body>
</section>
-<section>
+<section id="manip">
<title>Manipulation Functions</title>
<body>
@@ -484,16 +485,18 @@
These are implemented in <path>libs/manip.bash</path>.
</p>
-<p><b>The svn_date_to_version Function</b></p>
-
-<p>
- The <c>svn_date_to_version</c> function can be used instead of manually
- keeping track of VERSION. It is safe to use in global scope. The canonical
- usage is as shown below.
-</p>
+<dl>
+ <dt>svn_date_to_version</dt>
+ <dd>
+ The <c>svn_date_to_version</c> function can be used instead of
+ manually keeping track of VERSION. It is safe to use in global
+ scope. The canonical usage is as shown in the
+ <uri link="manip_pre1">code listing</uri> below.
+ </dd>
+</dl>
<pre caption="svn_date_to_version usage">
-SVN_DATE='$Date: 2009/09/19 12:32:37 $'
+SVN_DATE='$Date: 2009/09/20 09:04:54 $'
VERSION=$(svn_date_to_version "${SVN_DATE}" )
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
@@ -510,34 +513,33 @@
These are implemented in <path>libs/config.bash</path>.
</p>
-<p><b>The store_config Function</b></p>
-
-<p>
- The <c>store_config</c> function saves a key/value pair in a given
- configuration file which is passed as first argument. This file is a bash
- script consisting only of key/value pairs and should not be altered
- manually. Comments in the file will be deleted each time
- <c>store_config</c> is called. The function is invoked as
- <c>store_config filename key value</c>.
-</p>
-
-<p><b>The load_config Function</b></p>
-
-<p>
- The <c>load_config</c> function loads a stored value from the module's
- configuration file. It is invoked as <c>load_config filename key</c> and
- prints the associated value.
-</p>
-
-<p><b>The append_config Function</b></p>
-
-<p>
- The <c>append_config</c> function adds an item to an already stored value
- in the modules configuration file. It uses
- <c>load_config</c>/<c>store_config</c> internally and should be invoked as
- <c>append_config filename key item</c>. Note that the item will not be
- appended if it occurs in the key's value already.
-</p>
+<dl>
+ <dt>store_config</dt>
+ <dd>
+ The <c>store_config</c> function saves a key/value pair in a given
+ configuration file which is passed as first argument. This file is
+ a bash script consisting only of key/value pairs and should not be
+ altered manually. Comments in the file will be deleted each time
+ <c>store_config</c> is called. The function is invoked as
+ <c>store_config filename key value</c>.
+ </dd>
+
+ <dt>load_config</dt>
+ <dd>
+ The <c>load_config</c> function loads a stored value from the
+ module's configuration file. It is invoked as
+ <c>load_config filename key</c> and prints the associated value.
+ </dd>
+
+ <dt>append_config</dt>
+ <dd>
+ The <c>append_config</c> function adds an item to an already
+ stored value in the modules configuration file. It uses
+ <c>load_config</c>/<c>store_config</c> internally and should be
+ invoked as <c>append_config filename key item</c>. Note that the
+ item will not be appended if it occurs in the key's value already.
+ </dd>
+</dl>
</body>
</section>
@@ -547,17 +549,19 @@
<body>
<p>
-These are implemented in <path>libs/multilib.bash</path>.
+ These are implemented in <path>libs/multilib.bash</path>.
</p>
-<p><b>The list_libdirs Function</b></p>
-
-<p>
- The <c>list_libdirs</c> function returns a set of valid libdirs for the used
- architecture. By default it uses <path>/etc/ld.so.conf</path> to obtain all
- the valid libdirs. If this fails due to a missing or broken file, this
- function uses <c>uname</c> to determine the architecture.
-</p>
+<dl>
+ <dt>list_libdirs</dt>
+ <dd>
+ The <c>list_libdirs</c> function returns a set of valid libdirs
+ for the used architecture. By default it uses
+ <path>/etc/ld.so.conf</path> to obtain all the valid libdirs.
+ If this fails due to a missing or broken file, this function uses
+ <c>uname</c> to determine the architecture.
+ </dd>
+</dl>
</body>
</section>
@@ -570,50 +574,46 @@
These are implemented in <path>libs/package-manager.bash</path>.
</p>
-<p><b>The arch Function</b></p>
-
-<p>
- The <c>arch</c> function returns the correct value of ${ARCH} for the
- current system. If the package manager cannot provide this information,
- <c>arch</c> falls back to a <c>uname -m</c> and <c>uname -s</c> based
- lookup-table.
-</p>
-
-<p><b>The envvar Function</b></p>
-
-<p>
- The <c>envvar</c> function retrieves the contents of a
- configuration-environment variable for a given package. The syntax is
- <c>envvar ${package-name} ${var-name}</c>.
-</p>
-
-<p><b>The best_version Function</b></p>
-
-<p>
- The <c>best_version</c> function returns the highest available version for
- a given package dep atom.
-</p>
-
-<p><b>The has_version Function</b></p>
-
-<p>
- The <c>has_version</c> function checks whether a given versioned package
- dep atom is installed.
-</p>
-
-<p><b>The get_repositories Function</b></p>
-
-<p>
- The <c>get_repositories</c> function returns a list of repositories known
- to the package manager.
-</p>
-
-<p><b>The get_repo_news_dir Function</b></p>
-
-<p>
- The <c>get_repo_news_dir</c> function returns the directory where to find
- GLEP 42 news items for a given repository.
-</p>
+<dl>
+ <dt>arch</dt>
+ <dd>
+ The <c>arch</c> function returns the correct value of ${ARCH} for
+ the current system. If the package manager cannot provide this
+ information, <c>arch</c> falls back to a <c>uname -m</c> and
+ <c>uname -s</c> based lookup-table.
+ </dd>
+
+ <dt>envvar</dt>
+ <dd>
+ The <c>envvar</c> function retrieves the contents of a
+ configuration-environment variable for a given package. The syntax
+ is <c>envvar ${package-name} ${var-name}</c>.
+ </dd>
+
+ <dt>best_version</dt>
+ <dd>
+ The <c>best_version</c> function returns the highest available
+ version for a given package dep atom.
+ </dd>
+
+ <dt>has_version</dt>
+ <dd>
+ The <c>has_version</c> function checks whether a given versioned
+ package dep atom is installed.
+ </dd>
+
+ <dt>get_repositories</dt>
+ <dd>
+ The <c>get_repositories</c> function returns a list of
+ repositories known to the package manager.
+ </dd>
+
+ <dt>get_repo_news_dir</dt>
+ <dd>
+ The <c>get_repo_news_dir</c> function returns the directory where
+ to find GLEP 42 news items for a given repository.
+ </dd>
+</dl>
</body>
</section>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-09-20 9:31 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-09-20 9:31 UTC (permalink / raw
To: gentoo-commits
ulm 09/09/20 09:31:19
Modified: dev-guide.xml
Log:
Fix internal cross references. Indent consistently.
Revision Changes Path
1.8 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.7&r2=1.8
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dev-guide.xml 20 Sep 2009 09:04:54 -0000 1.7
+++ dev-guide.xml 20 Sep 2009 09:31:19 -0000 1.8
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.7 2009/09/20 09:04:54 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.8 2009/09/20 09:31:19 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -45,8 +45,8 @@
<note>
This document assumes some basic familiarity with eselect. Please read then
- <uri link="/proj/en/eselect/user-guide.xml">eselect User Guide</uri> in case
- you do not know the basics of eselect.
+ <uri link="user-guide.xml">eselect User Guide</uri> in case you do not know
+ the basics of eselect.
</note>
</body>
@@ -289,35 +289,33 @@
<dl>
<dt>die</dt>
<dd>
- The <c>die</c> function (which, unlike its ebuild counterpart,
- <e>can</e> be called from within subshells) is used to exit with
- a fatal error. It should be invoked as <c>die -q "Message to
- display"</c>. If the <c>-q</c> is not provided, a stacktrace will
- be displayed – this should never happen because of user input
- error, only abnormal conditions.
+ The <c>die</c> function (which, unlike its ebuild counterpart, <e>can</e>
+ be called from within subshells) is used to exit with a fatal error.
+ It should be invoked as <c>die -q "Message to display"</c>. If the
+ <c>-q</c> is not provided, a stacktrace will be displayed – this should
+ never happen because of user input error, only abnormal conditions.
</dd>
<dt>check_do</dt>
<dd>
- The <c>check_do</c> utility function checks that the first
- parameter is a function, and then calls it with any additional
- parameters as its arguments. If the function does not exist,
- <c>die</c> is called. Again, this is mostly internal.
+ The <c>check_do</c> utility function checks that the first parameter is
+ a function, and then calls it with any additional parameters as its
+ arguments. If the function does not exist, <c>die</c> is called. Again,
+ this is mostly internal.
</dd>
<dt>do_action</dt>
<dd>
- The <c>do_action</c> utility function is the correct way to call
- a utility function which is defined in another module. The first
- parameter is the action, additional parameters are passed as
- arguments.
+ The <c>do_action</c> utility function is the correct way to call a utility
+ function which is defined in another module. The first parameter is the
+ action, additional parameters are passed as arguments.
</dd>
<dt>inherit</dt>
<dd>
- The <c>inherit</c> function sources eselect library files based on
- their name. In order to source the file <path>libs/foo.bash</path>
- you have to add <c>inherit foo</c> in global scope of your module.
+ The <c>inherit</c> function sources eselect library files based on their
+ name. In order to source the file <path>libs/foo.bash</path> you have to
+ add <c>inherit foo</c> in global scope of your module.
</dd>
<dt>sed</dt>
@@ -329,7 +327,7 @@
</body>
</section>
-<section id="output">
+<section>
<title>Output Utility Functions</title>
<body>
@@ -340,66 +338,63 @@
<dl>
<dt>write_error_msg</dt>
<dd>
- The <c>write_error_msg</c> function displays an error message in
- the standard format. It is similar to <c>eerror</c>.
+ The <c>write_error_msg</c> function displays an error message in the
+ standard format. It is similar to <c>eerror</c>.
</dd>
<dt>write_warning_msg</dt>
<dd>
- The <c>write_warning_msg</c> function displays a warning message
- in the standard format. It is similar to <c>ewarn</c>.
+ The <c>write_warning_msg</c> function displays a warning message in the
+ standard format. It is similar to <c>ewarn</c>.
</dd>
<dt>The write_list_ functions</dt>
<dd>
- To display a list, the <c>write_list_</c> family of functions
- should be used. Lists should always start with a header, which can
- be displayed using <c>write_list_start The Header</c>.
+ To display a list, the <c>write_list_</c> family of functions should be
+ used. Lists should always start with a header, which can be displayed
+ using <c>write_list_start The Header</c>.
</dd>
<dt>write_numbered_list_entry</dt>
<dd>
- To display a numbered list, the <c>write_numbered_list_entry</c>
- function should be used for each item. The first parameter is the
- list item number, the second is the list item text (remember to
- quote this).
+ To display a numbered list, the <c>write_numbered_list_entry</c> function
+ should be used for each item. The first parameter is the list item number,
+ the second is the list item text (remember to quote this).
</dd>
<dt>write_kv_list_entry</dt>
<dd>
- To display a keyword/value list, the <c>write_kv_list_entry</c>
- function should be used. The first parameter is the key, the
- second the value.
+ To display a keyword/value list, the <c>write_kv_list_entry</c> function
+ should be used. The first parameter is the key, the second the value.
</dd>
<dt>write_numbered_list</dt>
<dd>
The <c>write_numbered_list</c> function is a wrapper around
- <c>write_numbered_list_entry</c> that handles the numbering
- automatically. Each parameter passed is displayed as a numbered
- list item, the first with index 1, the second with index 2 and
- so on. If <c>-p</c> is passed as the first argument to these
- functions, <e>plain</e> highlighting is used.
+ <c>write_numbered_list_entry</c> that handles the numbering automatically.
+ Each parameter passed is displayed as a numbered list item, the first with
+ index 1, the second with index 2 and so on. If <c>-p</c> is passed as the
+ first argument to these functions, <e>plain</e> highlighting is used.
</dd>
<dt>highlight</dt>
<dd>
- The <c>highlight</c> utility function can be used to emphasise
- some text which is to be displayed by any of the above functions.
- A typical invocation might look like the in the
- <uri link="#output_pre1">code listing</uri> shown below.
+ The <c>highlight</c> utility function can be used to emphasise some text
+ which is to be displayed by any of the above functions. A typical
+ invocation might look like the in the
+ <uri link="#doc_chap3_pre1">code listing</uri> shown below.
</dd>
<dt>highlight_warning</dt>
<dd>
- The <c>highlight_warning</c> function is like <c>highlight</c>,
- but for warnings. It displays the text in question in red.
+ The <c>highlight_warning</c> function is like <c>highlight</c>, but for
+ warnings. It displays the text in question in red.
</dd>
<dt>space</dt>
<dd>
- The <c>space</c> utility function takes a single integer
- parameter. It displays that many space characters.
+ The <c>space</c> utility function takes a single integer parameter.
+ It displays that many space characters.
</dd>
</dl>
@@ -424,22 +419,21 @@
<dl>
<dt>has</dt>
<dd>
- The <c>has</c> utility function is like Portage's <c>hasq</c>.
- It returns true if and only if the first parameter is equal to any
- of the remaining parameters.
+ The <c>has</c> utility function is like Portage's <c>hasq</c>. It returns
+ true if and only if the first parameter is equal to any of the remaining
+ parameters.
</dd>
<dt>is_function</dt>
<dd>
- The <c>is_function</c> utility function returns true if and only
- if its parameter exists and is a function. This is mostly used
- internally, but may have some use for modules.
+ The <c>is_function</c> utility function returns true if and only if its
+ parameter exists and is a function. This is mostly used internally, but
+ may have some use for modules.
</dd>
<dt>is_number</dt>
<dd>
- Returns true if and only if the parameter is a positive whole
- number.
+ Returns true if and only if the parameter is a positive whole number.
</dd>
</dl>
@@ -457,14 +451,14 @@
<dl>
<dt>basename</dt>
<dd>
- The <c>basename</c> function is a transparent bash-only
- replacement for the external <c>basename</c> application.
+ The <c>basename</c> function is a transparent bash-only replacement for
+ the external <c>basename</c> application.
</dd>
<dt>dirname</dt>
<dd>
- The <c>dirname</c> function is a transparent bash-only replacement
- for the external <c>dirname</c> application.
+ The <c>dirname</c> function is a transparent bash-only replacement for
+ the external <c>dirname</c> application.
</dd>
<dt>canonicalise</dt>
@@ -477,7 +471,7 @@
</body>
</section>
-<section id="manip">
+<section>
<title>Manipulation Functions</title>
<body>
@@ -488,15 +482,15 @@
<dl>
<dt>svn_date_to_version</dt>
<dd>
- The <c>svn_date_to_version</c> function can be used instead of
- manually keeping track of VERSION. It is safe to use in global
- scope. The canonical usage is as shown in the
- <uri link="manip_pre1">code listing</uri> below.
+ The <c>svn_date_to_version</c> function can be used instead of manually
+ keeping track of VERSION. It is safe to use in global scope. The canonical
+ usage is as shown in the <uri link="#doc_chap3_pre2">code listing</uri>
+ below.
</dd>
</dl>
<pre caption="svn_date_to_version usage">
-SVN_DATE='$Date: 2009/09/20 09:04:54 $'
+SVN_DATE='$Date: 2009/09/20 09:31:19 $'
VERSION=$(svn_date_to_version "${SVN_DATE}" )
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
@@ -526,9 +520,9 @@
<dt>load_config</dt>
<dd>
- The <c>load_config</c> function loads a stored value from the
- module's configuration file. It is invoked as
- <c>load_config filename key</c> and prints the associated value.
+ The <c>load_config</c> function loads a stored value from the module's
+ configuration file. It is invoked as <c>load_config filename key</c> and
+ prints the associated value.
</dd>
<dt>append_config</dt>
@@ -555,11 +549,10 @@
<dl>
<dt>list_libdirs</dt>
<dd>
- The <c>list_libdirs</c> function returns a set of valid libdirs
- for the used architecture. By default it uses
- <path>/etc/ld.so.conf</path> to obtain all the valid libdirs.
- If this fails due to a missing or broken file, this function uses
- <c>uname</c> to determine the architecture.
+ The <c>list_libdirs</c> function returns a set of valid libdirs for the
+ used architecture. By default it uses <path>/etc/ld.so.conf</path> to
+ obtain all the valid libdirs. If this fails due to a missing or broken
+ file, this function uses <c>uname</c> to determine the architecture.
</dd>
</dl>
@@ -577,10 +570,10 @@
<dl>
<dt>arch</dt>
<dd>
- The <c>arch</c> function returns the correct value of ${ARCH} for
- the current system. If the package manager cannot provide this
- information, <c>arch</c> falls back to a <c>uname -m</c> and
- <c>uname -s</c> based lookup-table.
+ The <c>arch</c> function returns the correct value of ${ARCH} for the
+ current system. If the package manager cannot provide this information,
+ <c>arch</c> falls back to a <c>uname -m</c> and <c>uname -s</c> based
+ lookup-table.
</dd>
<dt>envvar</dt>
@@ -592,26 +585,26 @@
<dt>best_version</dt>
<dd>
- The <c>best_version</c> function returns the highest available
- version for a given package dep atom.
+ The <c>best_version</c> function returns the highest available version for
+ a given package dep atom.
</dd>
<dt>has_version</dt>
<dd>
- The <c>has_version</c> function checks whether a given versioned
- package dep atom is installed.
+ The <c>has_version</c> function checks whether a given versioned package
+ dep atom is installed.
</dd>
<dt>get_repositories</dt>
<dd>
- The <c>get_repositories</c> function returns a list of
- repositories known to the package manager.
+ The <c>get_repositories</c> function returns a list of repositories known
+ to the package manager.
</dd>
<dt>get_repo_news_dir</dt>
<dd>
- The <c>get_repo_news_dir</c> function returns the directory where
- to find GLEP 42 news items for a given repository.
+ The <c>get_repo_news_dir</c> function returns the directory where to find
+ GLEP 42 news items for a given repository.
</dd>
</dl>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-09-20 10:19 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-09-20 10:19 UTC (permalink / raw
To: gentoo-commits
ulm 09/09/20 10:19:23
Modified: dev-guide.xml
Log:
Convert standard actions to dl too.
Revision Changes Path
1.9 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.8&r2=1.9
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dev-guide.xml 20 Sep 2009 09:31:19 -0000 1.8
+++ dev-guide.xml 20 Sep 2009 10:19:23 -0000 1.9
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.8 2009/09/20 09:31:19 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.9 2009/09/20 10:19:23 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -206,29 +206,32 @@
is exempt.)
</p>
-<ul>
- <li><c>help</c> – Display a help message. Automatic.</li>
- <li><c>usage</c> – Display a usage message. Automatic.</li>
- <li><c>version</c> – Display the current version. Automatic.</li>
- <li>
- <c>show</c> – Used to display the current provider of a symlink, or the
- currently installed module, or the current status.
- </li>
- <li>
- <c>list</c> – Used to display all available providers of a symlink, or all
- available modules.
- </li>
- <li><c>set</c> – Used to set a new provider or a symlink.</li>
- <li><c>enable</c> – Used to enable an optional feature.</li>
- <li><c>disable</c> – Used to disable an optional feature.</li>
- <li><c>scan</c> – Read information off the current filesystem.</li>
- <li>
- <c>update</c> – Used to automatically select a new provider for a symlink
- (as opposed to <c>set</c>, which generally takes a parameter manually
- selecting the provider) or to gather system information that is vital to
- further actions.
- </li>
-</ul>
+<dl>
+ <dt>help</dt><dd>Display a help message. Automatic.</dd>
+ <dt>usage</dt><dd>Display a usage message. Automatic.</dd>
+ <dt>version</dt><dd>Display the current version. Automatic.</dd>
+ <dt>show</dt>
+ <dd>
+ Used to display the current provider of a symlink, or the currently
+ installed module, or the current status.
+ </dd>
+ <dt>list</dt>
+ <dd>
+ Used to display all available providers of a symlink, or all available
+ modules.
+ </dd>
+ <dt>set</dt><dd>Used to set a new provider or a symlink.</dd>
+ <dt>enable</dt><dd>Used to enable an optional feature.</dd>
+ <dt>disable</dt><dd>Used to disable an optional feature.</dd>
+ <dt>scan</dt><dd>Read information off the current filesystem.</dd>
+ <dt>update</dt>
+ <dd>
+ Used to automatically select a new provider for a symlink (as opposed to
+ <c>set</c>, which generally takes a parameter manually selecting the
+ provider) or to gather system information that is vital to further
+ actions.
+ </dd>
+</dl>
<note>
You can override the <c>help</c>, <c>usage</c> and <c>version</c> actions.
@@ -260,14 +263,14 @@
</p>
<ul>
- <li>General Utility Functions</li>
- <li>Output Utility Functions</li>
- <li>Manipulation Functions</li>
- <li>Path-Manipulation Functions</li>
- <li>Configuration Functions</li>
- <li>Multilib Functions</li>
- <li>Package-Manager Functions</li>
- <li>Test Functions</li>
+ <li><uri link="#core">General Utility Functions</uri></li>
+ <li><uri link="#output">Output Utility Functions</uri></li>
+ <li><uri link="#tests">Test Functions</uri></li>
+ <li><uri link="#path-manipulation">Path-Manipulation Functions</uri></li>
+ <li><uri link="#manip">Manipulation Functions</uri></li>
+ <li><uri link="#config">Configuration Functions</uri></li>
+ <li><uri link="#multilib">Multilib Functions</uri></li>
+ <li><uri link="#package-manager">Package-Manager Functions</uri></li>
</ul>
<p>
@@ -278,7 +281,7 @@
</body>
</section>
-<section>
+<section id="core">
<title>General Utility Functions</title>
<body>
@@ -327,7 +330,7 @@
</body>
</section>
-<section>
+<section id="output">
<title>Output Utility Functions</title>
<body>
@@ -408,7 +411,7 @@
</body>
</section>
-<section>
+<section id="tests">
<title>Test Functions</title>
<body>
@@ -440,7 +443,7 @@
</body>
</section>
-<section>
+<section id="path-manipulation">
<title>Path-Manipulation Functions</title>
<body>
@@ -471,7 +474,7 @@
</body>
</section>
-<section>
+<section id="manip">
<title>Manipulation Functions</title>
<body>
@@ -490,7 +493,7 @@
</dl>
<pre caption="svn_date_to_version usage">
-SVN_DATE='$Date: 2009/09/20 09:31:19 $'
+SVN_DATE='$Date: 2009/09/20 10:19:23 $'
VERSION=$(svn_date_to_version "${SVN_DATE}" )
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
@@ -499,7 +502,7 @@
</body>
</section>
-<section>
+<section id="config">
<title>Configuration Functions</title>
<body>
@@ -538,7 +541,7 @@
</body>
</section>
-<section>
+<section id="multilib">
<title>Multilib Functions</title>
<body>
@@ -559,7 +562,7 @@
</body>
</section>
-<section>
+<section id="package-manager">
<title>Package-Manager Functions</title>
<body>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-09-20 10:47 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-09-20 10:47 UTC (permalink / raw
To: gentoo-commits
ulm 09/09/20 10:47:20
Modified: dev-guide.xml
Log:
Update from developer-guide.txt of eselect-1.2.2.
Revision Changes Path
1.10 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.9&r2=1.10
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dev-guide.xml 20 Sep 2009 10:19:23 -0000 1.9
+++ dev-guide.xml 20 Sep 2009 10:47:20 -0000 1.10
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.9 2009/09/20 10:19:23 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.10 2009/09/20 10:47:20 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -27,7 +27,7 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.2.1</version>
+<version>1.2.2</version>
<date>2009-09-20</date>
<chapter>
@@ -351,11 +351,17 @@
standard format. It is similar to <c>ewarn</c>.
</dd>
- <dt>The write_list_ functions</dt>
+ <dt>The write_list_ family of functions</dt>
<dd>
To display a list, the <c>write_list_</c> family of functions should be
- used. Lists should always start with a header, which can be displayed
- using <c>write_list_start The Header</c>.
+ used. If <c>-p</c> is passed as the first argument to these functions,
+ <e>plain</e> highlighting is used.
+ </dd>
+
+ <dt>write_list_start</dt>
+ <dd>
+ Lists should always start with a header, which can be displayed using
+ <c>write_list_start The Header</c>.
</dd>
<dt>write_numbered_list_entry</dt>
@@ -376,15 +382,16 @@
The <c>write_numbered_list</c> function is a wrapper around
<c>write_numbered_list_entry</c> that handles the numbering automatically.
Each parameter passed is displayed as a numbered list item, the first with
- index 1, the second with index 2 and so on. If <c>-p</c> is passed as the
- first argument to these functions, <e>plain</e> highlighting is used.
+ index 1, the second with index 2 and so on.
+ In eselect-1.2.2 or later, the <c>-m</c> option can be used to specify a
+ negative report message that is output for an empty list.
</dd>
<dt>highlight</dt>
<dd>
The <c>highlight</c> utility function can be used to emphasise some text
which is to be displayed by any of the above functions. A typical
- invocation might look like the in the
+ invocation might look like that in the
<uri link="#doc_chap3_pre1">code listing</uri> shown below.
</dd>
@@ -394,6 +401,16 @@
warnings. It displays the text in question in red.
</dd>
+ <dt>highlight_marker</dt>
+ <dd>
+ To mark a list entry as active/selected, the <c>highlight_marker</c>
+ function should be used. First argument is the list entry. The function
+ places a highlighted star (or its second argument instead, if set) behind
+ the entry. A typical invocation might look like that in the
+ <uri link="#doc_chap3_pre2">code listing</uri> shown below.
+ (This function appeared in eselect-1.2.)
+ </dd>
+
<dt>space</dt>
<dd>
The <c>space</c> utility function takes a single integer parameter.
@@ -408,6 +425,13 @@
write_kv_list_entry "Third" "$(highlight The end)"
</pre>
+<pre caption="highlight_marker example">
+for (( i = 0; i < ${#targets[@]}; i++ )); do
+ [[ test_if_target_is_active ]] \
+ && targets[i]=$(highlight_marker "${targets[i]}")
+done
+</pre>
+
</body>
</section>
@@ -487,13 +511,13 @@
<dd>
The <c>svn_date_to_version</c> function can be used instead of manually
keeping track of VERSION. It is safe to use in global scope. The canonical
- usage is as shown in the <uri link="#doc_chap3_pre2">code listing</uri>
+ usage is as shown in the <uri link="#doc_chap3_pre3">code listing</uri>
below.
</dd>
</dl>
<pre caption="svn_date_to_version usage">
-SVN_DATE='$Date: 2009/09/20 10:19:23 $'
+SVN_DATE='$Date: 2009/09/20 10:47:20 $'
VERSION=$(svn_date_to_version "${SVN_DATE}" )
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-11-07 16:41 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-11-07 16:41 UTC (permalink / raw
To: gentoo-commits
ulm 09/11/07 16:41:57
Modified: dev-guide.xml
Log:
Update from developer-guide.txt of eselect-1.2.6.
Revision Changes Path
1.11 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.10&r2=1.11
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dev-guide.xml 20 Sep 2009 10:47:20 -0000 1.10
+++ dev-guide.xml 7 Nov 2009 16:41:57 -0000 1.11
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.10 2009/09/20 10:47:20 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.11 2009/11/07 16:41:57 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -27,8 +27,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.2.2</version>
-<date>2009-09-20</date>
+<version>1.2.6</version>
+<date>2009-11-07</date>
<chapter>
<title>Introduction</title>
@@ -408,7 +408,15 @@
places a highlighted star (or its second argument instead, if set) behind
the entry. A typical invocation might look like that in the
<uri link="#doc_chap3_pre2">code listing</uri> shown below.
- (This function appeared in eselect-1.2.)
+ </dd>
+
+ <dt>is_output_mode</dt>
+ <dd>
+ The <c>is_output_mode</c> function returns true if and only if its
+ parameter is equal to eselect's output mode. Currently, only the default
+ and <c>brief</c> output modes are defined, the latter corresponding to
+ the <c>--brief</c> option.
+ (This function appeared in eselect-1.2.6.)
</dd>
<dt>space</dt>
@@ -420,7 +428,7 @@
<pre caption="highlight example">
write_list_start "This is $(highlight list) example"
-write_kv_list_entry "First" "This is the first"
+write_kv_list_entry "First" "This is the first entry"
write_kv_list_entry "$(highlight Second)" "This is the $(highlight second) entry"
write_kv_list_entry "Third" "$(highlight The end)"
</pre>
@@ -493,6 +501,14 @@
The <c>canonicalise</c> function is a wrapper to either GNU
<c>readlink -f</c> or <c>realpath</c>.
</dd>
+
+ <dt>relative_name</dt>
+ <dd>
+ The <c>relative_name</c> function converts a path name (passed as its
+ first argument) to be relative to a directory (second argument).
+ This can be used to generate a relative symlink from absolute paths.
+ (This function appeared in eselect-1.2.4.)
+ </dd>
</dl>
</body>
@@ -517,7 +533,7 @@
</dl>
<pre caption="svn_date_to_version usage">
-SVN_DATE='$Date: 2009/09/20 10:47:20 $'
+SVN_DATE='$Date: 2009/11/07 16:41:57 $'
VERSION=$(svn_date_to_version "${SVN_DATE}" )
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-11-07 17:05 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-11-07 17:05 UTC (permalink / raw
To: gentoo-commits
ulm 09/11/07 17:05:47
Modified: dev-guide.xml
Log:
Escape dollar signs.
Revision Changes Path
1.12 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.11&r2=1.12
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- dev-guide.xml 7 Nov 2009 16:41:57 -0000 1.11
+++ dev-guide.xml 7 Nov 2009 17:05:46 -0000 1.12
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.11 2009/11/07 16:41:57 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.12 2009/11/07 17:05:46 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -83,6 +83,7 @@
</p>
<pre caption="cow.eselect code">
+# -*-eselect-*- vim: ft=eselect
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: $
@@ -533,7 +534,7 @@
</dl>
<pre caption="svn_date_to_version usage">
-SVN_DATE='$Date: 2009/11/07 16:41:57 $'
+SVN_DATE='$Date: $'
VERSION=$(svn_date_to_version "${SVN_DATE}" )
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2009-11-07 17:20 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-11-07 17:20 UTC (permalink / raw
To: gentoo-commits
ulm 09/11/07 17:20:29
Modified: dev-guide.xml
Log:
Whitespace.
Revision Changes Path
1.13 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.12&r2=1.13
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- dev-guide.xml 7 Nov 2009 17:05:46 -0000 1.12
+++ dev-guide.xml 7 Nov 2009 17:20:29 -0000 1.13
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.12 2009/11/07 17:05:46 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.13 2009/11/07 17:20:29 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -535,7 +535,7 @@
<pre caption="svn_date_to_version usage">
SVN_DATE='$Date: $'
-VERSION=$(svn_date_to_version "${SVN_DATE}" )
+VERSION=$(svn_date_to_version "${SVN_DATE}")
<comment>(Now turn on the SVN keyword expansion for the module)</comment>
svn propset svn:keywords "Date" modules/foo.eselect
</pre>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2011-09-01 21:04 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-09-01 21:04 UTC (permalink / raw
To: gentoo-commits
ulm 11/09/01 21:04:25
Modified: dev-guide.xml
Log:
Update from developer-guide.txt.
Revision Changes Path
1.14 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.13&r2=1.14
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- dev-guide.xml 7 Nov 2009 17:20:29 -0000 1.13
+++ dev-guide.xml 1 Sep 2011 21:04:25 -0000 1.14
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.13 2009/11/07 17:20:29 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.14 2011/09/01 21:04:25 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -27,8 +27,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.2.6</version>
-<date>2009-11-07</date>
+<version>1.2.17</version>
+<date>2011-09-01</date>
<chapter>
<title>Introduction</title>
@@ -76,88 +76,115 @@
<body>
<p>
- It's easiest to illustrate by example. Here's a simple module, named
- <c>cow.eselect</c>. It has two actions, <c>moo</c> and <c>think</c>, plus
- the standard <c>help</c>, <c>usage</c> and <c>version</c> actions, and is
- installed to <path>$(datadir)/eselect/modules/</path>.
+ It's easiest to illustrate by example. Here's a simplified version of
+ the <c>kernel.eselect</c> module. It has three actions, <c>show</c>,
+ <c>list</c>, and <c>set</c>, plus the standard <c>help</c>, <c>usage</c>
+ and <c>version</c> actions, and is installed to
+ <path>$(datadir)/eselect/modules/</path>.
</p>
-<pre caption="cow.eselect code">
+<pre caption="kernel.eselect code">
# -*-eselect-*- vim: ft=eselect
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
+# Copyright 2005-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2 or later
# $Id: $
-DESCRIPTION="Do things to a cow"
-MAINTAINER="foo@gentoo.org"
+DESCRIPTION="Manage the /usr/src/linux symlink"
+MAINTAINER="eselect@gentoo.org"
SVN_DATE='$Date: $'
VERSION=$(svn_date_to_version "${SVN_DATE}")
-### moo action
+# find a list of kernel symlink targets
+find_targets() {
+ local f
+ for f in "${EROOT}"/usr/src/linux-[[:digit:]]*; do
+ [[ -d ${f} ]] && basename "${f}"
+ done
+}
-describe_moo() {
- echo "Say moo"
+# remove the kernel symlink
+remove_symlink() {
+ rm "${EROOT}/usr/src/linux"
}
-describe_moo_parameters() {
- echo "<text>"
+# set the kernel symlink
+set_symlink() {
+ local target=$1
+
+ if is_number "${target}"; then
+ local targets=( $(find_targets) )
+ target=${targets[target-1]}
+ fi
+
+ [[ -z ${target} || ! -d ${EROOT}/usr/src/${target} ]] \
+ && die -q "Target \"$1\" doesn't appear to be valid!"
+
+ ln -s "${target}" "${EROOT}/usr/src/linux"
}
-describe_moo_options() {
- echo "text : Text to display (optional)"
- echo "--dead : Use a dead cow"
- echo "--borg : Use a borged cow"
+### show action ###
+
+describe_show() {
+ echo "Show the current kernel symlink"
}
+do_show() {
+ write_list_start "Current kernel symlink:"
+ if [[ -L ${EROOT}/usr/src/linux ]]; then
+ local kernel=$(canonicalise "${EROOT}/usr/src/linux")
+ write_kv_list_entry "${kernel%/}" ""
+ else
+ write_kv_list_entry "(unset)" ""
+ fi
+}
-do_moo() {
- local params=
- while [[ ${1#--} != ${1} ]] ; do
- if [[ "--dead" == ${1} ]] ; then
- shift
- params="${params} -d"
- elif [[ "--borg" == "${1}" ]] ; then
- shift
- params="${params} -b"
- elif [[ "--" == "${1}" ]] ; then
- break
- else
- die -q "Unknown parameter ${1}"
- fi
- done
+### list action ###
- echo "${@:-I am a cow}" | cowsay ${params}
+describe_list() {
+ echo "List available kernel symlink targets"
}
-### think action
+do_list() {
+ local i targets=( $(find_targets) )
-describe_think() {
- echo "Show a pensive cow"
+ write_list_start "Available kernel symlink targets:"
+ for (( i = 0; i < ${#targets[@]}; i++ )); do
+ # highlight the target where the symlink is pointing to
+ [[ ${targets[i]} = \
+ $(basename "$(canonicalise "${EROOT}/usr/src/linux")") ]] \
+ && targets[i]=$(highlight_marker "${targets[i]}")
+ done
+ write_numbered_list -m "(none found)" "${targets[@]}"
}
-describe_think_parameters() {
- echo "<text>"
+### set action ###
+
+describe_set() {
+ echo "Set a new kernel symlink target"
}
-describe_think_options() {
- echo "text : Text to display"
- echo "--sheep : Use a sheep rather than a cow"
+describe_set_parameters() {
+ echo "<target>"
}
-do_think() {
- local params=
- while [[ ${1#--} != ${1} ]] ; do
- if [[ "--sheep" == ${1} ]] ; then
- shift
- params="${params} -f sheep"
- elif [[ "--" == "${1}" ]] ; then
- break
- else
- die -q "Unknown parameter ${1}"
- fi
- done
+describe_set_options() {
+ echo "target : Target name or number (from 'list' action)"
+}
- echo "${@:-Am I a cow?}" | cowthink ${params}
+do_set() {
+ [[ -z $1 ]] && die -q "You didn't tell me what to set the symlink to"
+ [[ $# -gt 1 ]] && die -q "Too many parameters"
+
+ if [[ -L ${EROOT}/usr/src/linux ]]; then
+ # existing symlink
+ remove_symlink || die -q "Couldn't remove existing symlink"
+ set_symlink "$1" || die -q "Couldn't set a new symlink"
+ elif [[ -e ${EROOT}/usr/src/linux ]]; then
+ # we have something strange
+ die -q "${EROOT}/usr/src/linux exists but is not a symlink"
+ else
+ set_symlink "$1" || die -q "Couldn't set a new symlink"
+ fi
}
</pre>
@@ -187,9 +214,16 @@
functions are optional.
</p>
+<p>
+ All eselect modules are required to support the ROOT variable. For prefix
+ support, variables EPREFIX and EROOT are also defined and have the same
+ meaning as in ebuilds.
+ (These two variables appeared in eselect-1.2.)
+</p>
+
<note>
- If eselect is invoked as <c>cow-config</c> or <c>cow-update</c> (for
- example, via a symlink), it will automatically select the cow module.
+ If eselect is invoked as <c>foo-config</c> or <c>foo-update</c> (for
+ example, via a symlink), it will automatically execute the foo module.
</note>
</body>
@@ -203,8 +237,7 @@
The following list contains suggested allowed names for actions. If there is
no suitable name on the list for your task, it is best to ask for the list
to be updated – for consistency, it would be nice to have a standardised
- list of action names. (The cow module, being a silly demonstration module,
- is exempt.)
+ list of action names.
</p>
<dl>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2011-09-01 21:10 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-09-01 21:10 UTC (permalink / raw
To: gentoo-commits
ulm 11/09/01 21:10:39
Modified: dev-guide.xml
Log:
Add a paragraph from developer-guide.txt.
Revision Changes Path
1.15 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.14&r2=1.15
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dev-guide.xml 1 Sep 2011 21:04:25 -0000 1.14
+++ dev-guide.xml 1 Sep 2011 21:10:39 -0000 1.15
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.14 2011/09/01 21:04:25 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.15 2011/09/01 21:10:39 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -226,6 +226,12 @@
example, via a symlink), it will automatically execute the foo module.
</note>
+<p>
+ All modules contributed to eselect should have a header indicating
+ copyright. This must be an exact copy of the header in the above example
+ (except for the years, of course).
+</p>
+
</body>
</section>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2011-09-01 21:25 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-09-01 21:25 UTC (permalink / raw
To: gentoo-commits
ulm 11/09/01 21:25:31
Modified: dev-guide.xml
Log:
Fix a typo.
Revision Changes Path
1.16 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.15&r2=1.16
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- dev-guide.xml 1 Sep 2011 21:10:39 -0000 1.15
+++ dev-guide.xml 1 Sep 2011 21:25:31 -0000 1.16
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.15 2011/09/01 21:10:39 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.16 2011/09/01 21:25:31 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -78,7 +78,7 @@
<p>
It's easiest to illustrate by example. Here's a simplified version of
the <c>kernel.eselect</c> module. It has three actions, <c>show</c>,
- <c>list</c>, and <c>set</c>, plus the standard <c>help</c>, <c>usage</c>
+ <c>list</c>, and <c>set</c>, plus the standard <c>help</c>, <c>usage</c>,
and <c>version</c> actions, and is installed to
<path>$(datadir)/eselect/modules/</path>.
</p>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml
@ 2012-01-21 23:57 Ulrich Mueller (ulm)
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller (ulm) @ 2012-01-21 23:57 UTC (permalink / raw
To: gentoo-commits
ulm 12/01/21 23:57:14
Modified: dev-guide.xml
Log:
Update for eselect 1.3.
Revision Changes Path
1.17 xml/htdocs/proj/en/eselect/dev-guide.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml?r1=1.16&r2=1.17
Index: dev-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dev-guide.xml 1 Sep 2011 21:25:31 -0000 1.16
+++ dev-guide.xml 21 Jan 2012 23:57:14 -0000 1.17
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.16 2011/09/01 21:25:31 ulm Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/eselect/dev-guide.xml,v 1.17 2012/01/21 23:57:14 ulm Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
@@ -27,8 +27,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.2.17</version>
-<date>2011-09-01</date>
+<version>1.3</version>
+<date>2012-01-21</date>
<chapter>
<title>Introduction</title>
@@ -85,8 +85,8 @@
<pre caption="kernel.eselect code">
# -*-eselect-*- vim: ft=eselect
-# Copyright 2005-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2 or later
+# Copyright 2005-2012 Gentoo Foundation
+# Distributed under the terms of the GNU GPL version 2 or later
# $Id: $
DESCRIPTION="Manage the /usr/src/linux symlink"
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-01-21 23:57 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-01 21:25 [gentoo-commits] gentoo commit in xml/htdocs/proj/en/eselect: dev-guide.xml Ulrich Mueller (ulm)
-- strict thread matches above, loose matches on Subject: below --
2012-01-21 23:57 Ulrich Mueller (ulm)
2011-09-01 21:10 Ulrich Mueller (ulm)
2011-09-01 21:04 Ulrich Mueller (ulm)
2009-11-07 17:20 Ulrich Mueller (ulm)
2009-11-07 17:05 Ulrich Mueller (ulm)
2009-11-07 16:41 Ulrich Mueller (ulm)
2009-09-20 10:47 Ulrich Mueller (ulm)
2009-09-20 10:19 Ulrich Mueller (ulm)
2009-09-20 9:31 Ulrich Mueller (ulm)
2009-09-20 9:04 Ulrich Mueller (ulm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox