Rename the eapi2_pre2_* functions to just eapi2_* and document all the
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Aug 2008 12:02:51 +0000 (12:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Aug 2008 12:02:51 +0000 (12:02 -0000)
new eapi* functions.

svn path=/main/trunk/; revision=11351

bin/ebuild.sh
bin/isolated-functions.sh
doc/package/ebuild/eapi/2.docbook

index 734dd0ad637b6956b6c6e5e3c3d0e1cb172e0441..c829eac831129f9b22b253318d19bd37df7cdb72 100755 (executable)
@@ -1435,7 +1435,7 @@ _ebuild_phase_funcs() {
                                eval "default_$x() {
                                        die \"default_$x() is not supported with EAPI='$eapi' during phase $phase_func\"
                                }"
-                               for y in 0 1 2_pre1 ; do
+                               for y in 0 1 2 ; do
                                        eval "eapi${y}_$x() {
                                                die \"eapi${y}_$x() is not supported with EAPI='$eapi' during phase $phase_func\"
                                        }"
@@ -1472,12 +1472,12 @@ _ebuild_phase_funcs() {
                                eapi1_src_test      () { _eapi0_src_test      "$@" ; }
                                eapi1_src_install   () { _eapi0_src_install   "$@" ; }
 
-                               eapi2_pre2_pkg_nofetch   () { _eapi0_pkg_nofetch   "$@" ; }
-                               eapi2_pre2_src_unpack    () { _eapi0_src_unpack    "$@" ; }
-                               eapi2_pre2_src_configure () { _eapi2_src_configure "$@" ; }
-                               eapi2_pre2_src_compile   () { _eapi2_src_compile   "$@" ; }
-                               eapi2_pre2_src_test      () { _eapi0_src_test      "$@" ; }
-                               eapi2_pre2_src_install   () { _eapi0_src_install   "$@" ; }
+                               eapi2_pkg_nofetch   () { _eapi0_pkg_nofetch   "$@" ; }
+                               eapi2_src_unpack    () { _eapi0_src_unpack    "$@" ; }
+                               eapi2_src_configure () { _eapi2_src_configure "$@" ; }
+                               eapi2_src_compile   () { _eapi2_src_compile   "$@" ; }
+                               eapi2_src_test      () { _eapi0_src_test      "$@" ; }
+                               eapi2_src_install   () { _eapi0_src_install   "$@" ; }
 
                                for x in $default_phases ; do
                                        eval "default_$x() { eapi${eapi}_$x \"\$@\" ; }"
@@ -1491,7 +1491,7 @@ _ebuild_phase_funcs() {
                                        eval "default_$x() {
                                                die \"default_$x() is not supported in phase $default_func\"
                                        }"
-                                       for y in 0 1 2_pre2 ; do
+                                       for y in 0 1 2 ; do
                                                eval "eapi${y}_$x() {
                                                        die \"eapi${y}_$x() is not supported with EAPI='$eapi' during phase $phase_func\"
                                                }"
index 85a478e6b0bee88c9e5843d0ee8e0e66728b0f2e..e52c9fd7c7797590fc70aed4f16949d5fb579035 100755 (executable)
@@ -546,7 +546,7 @@ save_ebuild_env() {
                for x in pkg_setup pkg_nofetch src_unpack src_configure \
                        src_compile src_test src_install pkg_preinst pkg_postinst \
                        pkg_prerm pkg_postrm ; do
-                       unset -f {,_}default_$x {,_}eapi{0,1,2,2_pre1,2_pre2}_$x
+                       unset -f {,_}default_$x {,_}eapi{0,1,2}_$x
                done
                unset x
 
index 275ab71ef0c0e4bce3a573e159f0081adb51fff8..cf511893ae5b2a90763cb3ebb602d10522b36133 100644 (file)
                <sect3 id='package-ebuild-eapi-2-phases-default-functions'>
                        <title>Default Phase Functions</title>
                        <para>
-                       Each of the default src_* phase functions is now accessible
-                       via a function having a name that begins with default_ and
+                       The default pkg_nofetch and src_* phase functions are now
+                       accessible via a function having a name
+                       that begins with default_ and
                        ends with the respective phase function name. For example,
                        a call to a function with the name default_src_compile is
                        equivalent to a call to the default src_compile
                        implementation.
                        </para>
+                       <table><title>Default Phase Functions</title>
+                               <tgroup cols='1' align='left' >
+                               <colspec colname='name'/>
+                               <thead>
+                               <row>
+                                       <entry>Function Name</entry>
+                               </row>
+                               </thead>
+                               <tbody>
+                               <row>
+                                       <entry>default_pkg_nofetch</entry>
+                               </row>
+                               <row>
+                                       <entry>default_src_unpack</entry>
+                               </row>
+                               <row>
+                                       <entry>default_src_compile</entry>
+                               </row>
+                               <row>
+                                       <entry>default_src_test</entry>
+                               </row>
+                               </tbody>
+                               </tgroup>
+                       </table>
+                       <para>
+                       The default phase functions for a particular EAPI are also
+                       accessible as functions having names that start with 'eapi'
+                       followed by the EAPI value. For example, a call to a function
+                       named eapi0_src_compile is equivalent to a call to the
+                       default src_compile implementation that is provided with EAPI 0.
+                       </para>
+                       <table><title>Default EAPI Phase Functions</title>
+                               <tgroup cols='1' align='left' >
+                               <colspec colname='name'/>
+                               <thead>
+                               <row>
+                                       <entry>Function Name</entry>
+                               </row>
+                               </thead>
+                               <tbody>
+                               <row>
+                                       <entry>eapi0_pkg_nofetch</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi0_src_unpack</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi0_src_compile</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi0_src_test</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi1_pkg_nofetch</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi1_src_unpack</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi1_src_compile</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi1_src_test</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi2_pkg_nofetch</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi2_src_unpack</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi2_src_configure</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi2_src_compile</entry>
+                               </row>
+                               <row>
+                                       <entry>eapi2_src_test</entry>
+                               </row>
+                               </tbody>
+                               </tgroup>
+                       </table>
                </sect3>
                <sect3 id='package-ebuild-eapi-2-phases-default-function-alias'>
                        <title>Default Phase Function Alias</title>