summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2011-09-21 15:50:28 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-21 17:03:45 -0700
commit9144182d9c8f0cf16973d8ec91eafc624310c6ca (patch)
treeea94397739f9621b9c162fe2d9ca22ea6d39bd7b
parent2733ea17d8e25db8dd369e8890337ddb553e2509 (diff)
downloadportage-9144182d9c8f0cf16973d8ec91eafc624310c6ca.tar.gz
portage-9144182d9c8f0cf16973d8ec91eafc624310c6ca.tar.bz2
portage-9144182d9c8f0cf16973d8ec91eafc624310c6ca.zip
add install hooks
-rwxr-xr-xbin/misc-functions.sh15
-rw-r--r--pym/portage/package/ebuild/doebuild.py3
2 files changed, 17 insertions, 1 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 30244a74b..7d858a28a 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -985,6 +985,21 @@ success_hooks() {
done
}
+install_hooks() {
+ local hooks_dir="${PORTAGE_CONFIG_ROOT}/etc/portage/hooks/install"
+ local fp
+ local ret=0
+ shopt -s nullglob
+ for fp in "${hooks_dir}"/*; do
+ if [ -x "$fp" ]; then
+ "$fp"
+ ret=$(( $ret | $? ))
+ fi
+ done
+ shopt +s nullglob
+ return $ret
+}
+
if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then
source_all_bashrcs
[ "$PORTAGE_DEBUG" == "1" ] && set -x
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 427589a6b..9939e9cc2 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1393,7 +1393,8 @@ _post_phase_cmds = {
"install" : [
"install_qa_check",
- "install_symlink_html_docs"],
+ "install_symlink_html_docs",
+ "install_hooks"],
"preinst" : [
"preinst_sfperms",