aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-21 11:18:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-21 11:18:38 +0000
commita4dd9541cac95f46fc236ef81b440e88379a6649 (patch)
tree6926eab737a8b5df2afcd9676f821b8bc7877de9
parentba480587d5e2f3a908d8a69f9eb6a9c9e5e56fdf (diff)
downloadpaludis-a4dd9541cac95f46fc236ef81b440e88379a6649.tar.gz
paludis-a4dd9541cac95f46fc236ef81b440e88379a6649.tar.xz
Add silly pre/post functions support
-rw-r--r--ebuild/pkg_postinst.bash14
-rw-r--r--ebuild/pkg_postrm.bash14
-rw-r--r--ebuild/pkg_preinst.bash14
-rw-r--r--ebuild/pkg_prerm.bash14
-rw-r--r--ebuild/pkg_setup.bash14
-rw-r--r--ebuild/src_compile.bash14
-rw-r--r--ebuild/src_install.bash14
-rw-r--r--ebuild/src_test.bash14
-rw-r--r--ebuild/src_unpack.bash14
9 files changed, 117 insertions, 9 deletions
diff --git a/ebuild/pkg_postinst.bash b/ebuild/pkg_postinst.bash
index c998529..9eb7c6c 100644
--- a/ebuild/pkg_postinst.bash
+++ b/ebuild/pkg_postinst.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -35,9 +35,21 @@ ebuild_f_postinst()
elif hasq "postinst" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping pkg_postinst (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_pkg_postinst ) == "function" ]] ; then
+ ebuild_section "Starting pre_pkg_postinst"
+ pre_pkg_postinst
+ ebuild_section "Done pre_pkg_postinst"
+ fi
+
ebuild_section "Starting pkg_postinst"
pkg_postinst
ebuild_section "Done pkg_postinst"
+
+ if [[ $(type -t post_pkg_postinst ) == "function" ]] ; then
+ ebuild_section "Starting post_pkg_postinst"
+ post_pkg_postinst
+ ebuild_section "Done post_pkg_postinst"
+ fi
fi
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_WRITE="${old_sandbox_write}"
diff --git a/ebuild/pkg_postrm.bash b/ebuild/pkg_postrm.bash
index c5b741d..9fc7855 100644
--- a/ebuild/pkg_postrm.bash
+++ b/ebuild/pkg_postrm.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -35,9 +35,21 @@ ebuild_f_postrm()
elif hasq "postrm" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping pkg_postrm (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_pkg_postrm ) == "function" ]] ; then
+ ebuild_section "Starting pre_pkg_postrm"
+ pre_pkg_postrm
+ ebuild_section "Done pre_pkg_postrm"
+ fi
+
ebuild_section "Starting pkg_postrm"
pkg_postrm
ebuild_section "Done pkg_postrm"
+
+ if [[ $(type -t post_pkg_postrm ) == "function" ]] ; then
+ ebuild_section "Starting post_pkg_postrm"
+ post_pkg_postrm
+ ebuild_section "Done post_pkg_postrm"
+ fi
fi
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_WRITE="${old_sandbox_write}"
diff --git a/ebuild/pkg_preinst.bash b/ebuild/pkg_preinst.bash
index 0636600..70a3461 100644
--- a/ebuild/pkg_preinst.bash
+++ b/ebuild/pkg_preinst.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -35,9 +35,21 @@ ebuild_f_preinst()
elif hasq "preinst" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping pkg_preinst (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_pkg_preinst ) == "function" ]] ; then
+ ebuild_section "Starting pre_pkg_preinst"
+ pre_pkg_preinst
+ ebuild_section "Done pre_pkg_preinst"
+ fi
+
ebuild_section "Starting pkg_preinst"
pkg_preinst
ebuild_section "Done pkg_preinst"
+
+ if [[ $(type -t post_pkg_preinst ) == "function" ]] ; then
+ ebuild_section "Starting post_pkg_preinst"
+ post_pkg_preinst
+ ebuild_section "Done post_pkg_preinst"
+ fi
fi
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_WRITE="${old_sandbox_write}"
diff --git a/ebuild/pkg_prerm.bash b/ebuild/pkg_prerm.bash
index d515414..ca28d79 100644
--- a/ebuild/pkg_prerm.bash
+++ b/ebuild/pkg_prerm.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -35,9 +35,21 @@ ebuild_f_prerm()
elif hasq "prerm" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping pkg_prerm (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_pkg_prerm ) == "function" ]] ; then
+ ebuild_section "Starting pre_pkg_prerm"
+ pre_pkg_prerm
+ ebuild_section "Done pre_pkg_prerm"
+ fi
+
ebuild_section "Starting pkg_prerm"
pkg_prerm
ebuild_section "Done pkg_prerm"
+
+ if [[ $(type -t post_pkg_prerm ) == "function" ]] ; then
+ ebuild_section "Starting post_pkg_prerm"
+ post_pkg_prerm
+ ebuild_section "Done post_pkg_prerm"
+ fi
fi
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_WRITE="${old_sandbox_write}"
diff --git a/ebuild/pkg_setup.bash b/ebuild/pkg_setup.bash
index 307d8f8..51b83a4 100644
--- a/ebuild/pkg_setup.bash
+++ b/ebuild/pkg_setup.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -35,9 +35,21 @@ ebuild_f_setup()
elif hasq "setup" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping pkg_setup (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_pkg_setup ) == "function" ]] ; then
+ ebuild_section "Starting pre_pkg_setup"
+ pre_pkg_setup
+ ebuild_section "Done pre_pkg_setup"
+ fi
+
ebuild_section "Starting pkg_setup"
pkg_setup
ebuild_section "Done pkg_setup"
+
+ if [[ $(type -t post_pkg_setup ) == "function" ]] ; then
+ ebuild_section "Starting post_pkg_setup"
+ post_pkg_setup
+ ebuild_section "Done post_pkg_setup"
+ fi
fi
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_WRITE="${old_sandbox_write}"
diff --git a/ebuild/src_compile.bash b/ebuild/src_compile.bash
index 563e970..42c8de1 100644
--- a/ebuild/src_compile.bash
+++ b/ebuild/src_compile.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -39,9 +39,21 @@ ebuild_f_compile()
elif hasq "compile" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping src_compile (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_src_compile ) == "function" ]] ; then
+ ebuild_section "Starting pre_src_compile"
+ pre_src_compile
+ ebuild_section "Done pre_src_compile"
+ fi
+
ebuild_section "Starting src_compile"
src_compile
ebuild_section "Done src_compile"
+
+ if [[ $(type -t post_src_compile ) == "function" ]] ; then
+ ebuild_section "Starting post_src_compile"
+ post_src_compile
+ ebuild_section "Done post_src_compile"
+ fi
fi
}
diff --git a/ebuild/src_install.bash b/ebuild/src_install.bash
index ff33802..d7a67cd 100644
--- a/ebuild/src_install.bash
+++ b/ebuild/src_install.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -36,9 +36,21 @@ ebuild_f_install()
elif hasq "install" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping src_install (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_src_install ) == "function" ]] ; then
+ ebuild_section "Starting pre_src_install"
+ pre_src_install
+ ebuild_section "Done pre_src_install"
+ fi
+
ebuild_section "Starting src_install"
src_install
ebuild_section "Done src_install"
+
+ if [[ $(type -t post_src_install ) == "function" ]] ; then
+ ebuild_section "Starting post_src_install"
+ post_src_install
+ ebuild_section "Done post_src_install"
+ fi
fi
}
diff --git a/ebuild/src_test.bash b/ebuild/src_test.bash
index ced06e7..7077263 100644
--- a/ebuild/src_test.bash
+++ b/ebuild/src_test.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -59,9 +59,21 @@ ebuild_f_test()
elif hasq "test" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping src_test (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_src_test ) == "function" ]] ; then
+ ebuild_section "Starting pre_src_test"
+ pre_src_test
+ ebuild_section "Done pre_src_test"
+ fi
+
ebuild_section "Starting src_test"
src_test
ebuild_section "Done src_test"
+
+ if [[ $(type -t post_src_test ) == "function" ]] ; then
+ ebuild_section "Starting post_src_test"
+ post_src_test
+ ebuild_section "Done post_src_test"
+ fi
fi
export PALUDIS_EXTRA_DIE_MESSAGE="${save_PALUDIS_EXTRA_DIE_MESSAGE}"
diff --git a/ebuild/src_unpack.bash b/ebuild/src_unpack.bash
index ec837f8..02ce83e 100644
--- a/ebuild/src_unpack.bash
+++ b/ebuild/src_unpack.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -34,9 +34,21 @@ ebuild_f_unpack()
elif hasq "unpack" ${SKIP_FUNCTIONS} ; then
ebuild_section "Skipping src_unpack (SKIP_FUNCTIONS)"
else
+ if [[ $(type -t pre_src_unpack ) == "function" ]] ; then
+ ebuild_section "Starting pre_src_unpack"
+ pre_src_unpack
+ ebuild_section "Done pre_src_unpack"
+ fi
+
ebuild_section "Starting src_unpack"
src_unpack
ebuild_section "Done src_unpack"
+
+ if [[ $(type -t post_src_unpack ) == "function" ]] ; then
+ ebuild_section "Starting post_src_unpack"
+ post_src_unpack
+ ebuild_section "Done post_src_unpack"
+ fi
fi
}