diff options
author | John Mylchreest <johnm@gentoo.org> | 2005-06-23 20:23:00 +0000 |
---|---|---|
committer | John Mylchreest <johnm@gentoo.org> | 2005-06-23 20:23:00 +0000 |
commit | ac837a67f033cf70e2fe25a9113c97b8dd02d679 (patch) | |
tree | 71c9b72a0dd1ee4121c6e09b1d83e1db38dae18d /eclass | |
parent | added gzip use flag for x11-misc/openclipart (diff) | |
download | gentoo-2-ac837a67f033cf70e2fe25a9113c97b8dd02d679.tar.gz gentoo-2-ac837a67f033cf70e2fe25a9113c97b8dd02d679.tar.bz2 gentoo-2-ac837a67f033cf70e2fe25a9113c97b8dd02d679.zip |
adding pkg_prerm as per bug #96510
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index e1217b472503..db55760bf9e0 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.126 2005/06/22 18:02:40 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.127 2005/06/23 20:23:00 johnm Exp $ # Description: kernel.eclass rewrite for a clean base regarding the 2.6 # series of kernel with back-compatibility for 2.4 @@ -60,7 +60,7 @@ inherit toolchain-funcs versionator multilib ECLASS="kernel-2" INHERITED="$INHERITED $ECLASS" EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install \ - pkg_preinst pkg_postinst + pkg_preinst pkg_postinst pkg_prerm export CTARGET=${CTARGET:-${CHOST}} if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then @@ -919,3 +919,20 @@ kernel-2_pkg_setup() { [[ ${ETYPE} == headers ]] && setup_headers [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..." } + +kernel-2_pkg_prerm() { + local KV_DIR=${ROOT}/usr/src/linux-${KV_FULL} + + if [[ ${ETYPE} == sources ]]; then + # if we have a config for it then we should act on it. + if [[ -f ${KV_DIR}/.config ]]; then + gzip -c ${KV_DIR}/.config > ${KV_DIR}.config + fi + + # have kbuild clean up for us. + if [[ -f ${KV_DIR}/include/linux/version.h ]]; then + ARCH=$(tc-arch-kernel) + make -C ${KV_DIR} mrproper + fi + fi +} |