From c3ac869582159f6712393bd581808e4c79d72d99 Mon Sep 17 00:00:00 2001 From: John Mylchreest Date: Thu, 25 Nov 2004 15:41:06 +0000 Subject: [PATCH] Updating kernel-2.eclass so tat the detect_* functions are moved to pkg_setup. for older kernel ebuilds this shouldnt cause a problem. if it does, please add K_NODETECTVER='yes' to the ebuild before the inherit line. --- eclass/kernel-2.eclass | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 35c6ac365e11..721f17f31cbf 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.47 2004/11/24 16:36:38 johnm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.48 2004/11/25 15:41:06 johnm Exp $ # kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel # with back-compatibility for 2.4 @@ -32,6 +32,7 @@ # postinst and can be used to carry additional postinst # messages # K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's +# K_NODETECTVER - Dont try to detect_version in pkg_setup. we will specify KV, OKV and EXTRAVERSION ourselves. # H_SUPPORTEDARCH - this should be a space separated list of ARCH's which # can be supported by the headers ebuild # UNIPATCH_LIST - space delimetered list of patches to be applied to the @@ -61,7 +62,7 @@ SLOT="${KV}" # Grab kernel version from KV KV_MAJOR=$(echo ${KV} | cut -d. -f1) KV_MINOR=$(echo ${KV} | cut -d. -f2) -KV_PATCH=$(echo ${KV} | cut -d. -f3-) +KV_PATCH=$(echo ${KV} | cut -d. -f3) KV_PATCH=${KV_PATCH/[-_]*/} # set LINUX_HOSTCFLAGS if not already set @@ -142,14 +143,19 @@ universal_unpack() { [ -z "${OKV}" ] && OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 if [ "${OKV}" != "${KV}" ] then mv linux-${OKV} linux-${KV} || \ die "Unable to move source tree to ${KV}." + + # since pkg_setup sets S, and then portage resets S we + # need to re-set S= or it wont be correct. + S="${WORKDIR}/linux-${KV}" fi + cd ${S} - # change incorrect install path [ -z "${K_NOFIXINSTALL_PATH}" ] && \ sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile @@ -715,5 +721,9 @@ kernel-2_pkg_setup() { [ "${ETYPE}" == "headers" ] && setup_headers # This is to fix some weird portage bug? in stable versions of portage. - [ "${ETYPE}" == "sources" ] && echo ">>> Preparing to unpack..." + if [ "${ETYPE}" == "sources" ] ; + then + [ -z "${K_NODETECTVER}" ] && detect_version + detect_arch + fi } -- 2.26.2