From: Zac Medico Date: Tue, 11 Dec 2007 21:32:44 +0000 (-0000) Subject: Add some documentation for ebuild phases and pre/post phase X-Git-Tag: v2.1.4~128 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d632b7bc0d9518d91ee0003d1a88ad43b259832e;p=portage.git Add some documentation for ebuild phases and pre/post phase hooks that can be defined via bashrc. (trunk r8876) svn path=/main/branches/2.1.2/; revision=8879 --- diff --git a/doc/config.docbook b/doc/config.docbook new file mode 100644 index 000000000..118d98b55 --- /dev/null +++ b/doc/config.docbook @@ -0,0 +1,4 @@ + +Configuration +&config_bashrc; + diff --git a/doc/config/bashrc.docbook b/doc/config/bashrc.docbook new file mode 100644 index 000000000..2f0626215 --- /dev/null +++ b/doc/config/bashrc.docbook @@ -0,0 +1,22 @@ + + Bashrc Configuration + + bashrc locations + + If a bashrc file is located at /etc/portage/bashrc + then it will be sourced before an ebuild is executed. + + + + Ebuild Phase Hooks + + A phase hook function name begins with a pre_ or post_ + prefix to indicate that it will be called before or after + one of the ebuild phases. + The prefix is followed by the name of the ebuild function that the hook + will be associated with. For example, a hook named pre_src_compile + will be called before src_compile, and a hook named post_src_compile + will be called after src_compile. + + + diff --git a/doc/package.docbook b/doc/package.docbook new file mode 100644 index 000000000..d37e6d525 --- /dev/null +++ b/doc/package.docbook @@ -0,0 +1,4 @@ + +Package Formats +&package_ebuild; + diff --git a/doc/package/ebuild.docbook b/doc/package/ebuild.docbook new file mode 100644 index 000000000..5466f99db --- /dev/null +++ b/doc/package/ebuild.docbook @@ -0,0 +1,4 @@ + +Ebuild +&package_ebuild_phases; + diff --git a/doc/package/ebuild/phases.docbook b/doc/package/ebuild/phases.docbook new file mode 100644 index 000000000..5c7f04969 --- /dev/null +++ b/doc/package/ebuild/phases.docbook @@ -0,0 +1,43 @@ + + Ebuild Phases + + Ebuild execution is divided into a series of phases. In order + to implement a phase, an ebuild defines a function to serve as + an entry point for execution of that phase. + This design is similar to the template method pattern that + is commonly used in object oriented programming languages. An ebuild + can inherit or override a template method from an eclass. + + + The function names for the ebuild phases, listed in order of execution: + + + pkg_setup + + + src_unpack + + + src_compile + + + src_test + + + src_install + + + pkg_preinst + + + pkg_postinst + + + pkg_prerm + + + pkg_postrm + + + + diff --git a/doc/portage.docbook b/doc/portage.docbook index 1ca868722..6b3f53e1f 100644 --- a/doc/portage.docbook +++ b/doc/portage.docbook @@ -7,7 +7,12 @@ + + + + + ]> @@ -27,6 +32,8 @@ &date; +&config; +&package; &qa;