From 9a342dc14d405d041af40f76b8b9b7855fcda692 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 9 Dec 2007 05:50:48 +0000 Subject: Add some documentation for ebuild phases and pre/post phase hooks that can be defined via bashrc. svn path=/main/trunk/; revision=8876 --- doc/config.docbook | 1 + doc/config/bashrc.docbook | 22 ++++++++++++++++++++ doc/package.docbook | 4 ++++ doc/package/ebuild.docbook | 4 ++++ doc/package/ebuild/phases.docbook | 43 +++++++++++++++++++++++++++++++++++++++ doc/portage.docbook | 5 +++++ 6 files changed, 79 insertions(+) create mode 100644 doc/config/bashrc.docbook create mode 100644 doc/package.docbook create mode 100644 doc/package/ebuild.docbook create mode 100644 doc/package/ebuild/phases.docbook (limited to 'doc') diff --git a/doc/config.docbook b/doc/config.docbook index 39c560080..88009dfc6 100644 --- a/doc/config.docbook +++ b/doc/config.docbook @@ -1,4 +1,5 @@ Configuration +&config_bashrc; &config_set; 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 ac1061310..5417bb73e 100644 --- a/doc/portage.docbook +++ b/doc/portage.docbook @@ -7,8 +7,12 @@ + + + + ]> @@ -30,6 +34,7 @@ &config; +&package; &qa; -- cgit v1.2.3-1-g7c22