/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.255 Revision 1.260
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.255 2011/08/08 23:14:56 mpagano Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.260 2011/08/29 01:28:10 vapier Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Original author: John Mylchreest <johnm@gentoo.org> 8# Original author: John Mylchreest <johnm@gentoo.org>
68# the doc dir 68# the doc dir
69# UNIPATCH_STRICTORDER - if this is set places patches into directories of 69# UNIPATCH_STRICTORDER - if this is set places patches into directories of
70# order, so they are applied in the order passed 70# order, so they are applied in the order passed
71 71
72inherit eutils toolchain-funcs versionator multilib 72inherit eutils toolchain-funcs versionator multilib
73EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst 73EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
74 74
75# Added by Daniel Ostrow <dostrow@gentoo.org> 75# Added by Daniel Ostrow <dostrow@gentoo.org>
76# This is an ugly hack to get around an issue with a 32-bit userland on ppc64. 76# This is an ugly hack to get around an issue with a 32-bit userland on ppc64.
77# I will remove it when I come up with something more reasonable. 77# I will remove it when I come up with something more reasonable.
78[[ ${PROFILE_ARCH} == "ppc64" ]] && CHOST="powerpc64-${CHOST#*-}" 78[[ ${PROFILE_ARCH} == "ppc64" ]] && CHOST="powerpc64-${CHOST#*-}"
104# if you are adding new functionality in, put a call to it 104# if you are adding new functionality in, put a call to it
105# at the start of src_unpack, or during SRC_URI/dep generation. 105# at the start of src_unpack, or during SRC_URI/dep generation.
106debug-print-kernel2-variables() { 106debug-print-kernel2-variables() {
107 for v in PVR CKV OKV KV KV_FULL KV_MAJOR KV_MINOR KV_PATCH RELEASETYPE \ 107 for v in PVR CKV OKV KV KV_FULL KV_MAJOR KV_MINOR KV_PATCH RELEASETYPE \
108 RELEASE UNIPATCH_LIST_DEFAULT UNIPATCH_LIST_GENPATCHES \ 108 RELEASE UNIPATCH_LIST_DEFAULT UNIPATCH_LIST_GENPATCHES \
109 UNIPATCH_LIST S KERNEL_URI ; do 109 UNIPATCH_LIST S KERNEL_URI K_WANT_GENPATCHES ; do
110 debug-print "${v}: ${!v}" 110 debug-print "${v}: ${!v}"
111 done 111 done
112} 112}
113 113
114#Eclass functions only from here onwards ... 114#Eclass functions only from here onwards ...
218# if [[ ${KV_MAJOR} -ge 3 ]]; then 218# if [[ ${KV_MAJOR} -ge 3 ]]; then
219 if [[ ${#OKV_ARRAY[@]} -lt 3 ]]; then 219 if [[ ${#OKV_ARRAY[@]} -lt 3 ]]; then
220 KV_PATCH_ARR=(${KV_PATCH//\./ }) 220 KV_PATCH_ARR=(${KV_PATCH//\./ })
221 221
222 # at this point 080811, Linus is putting 3.1 kernels in 3.0 directory 222 # at this point 080811, Linus is putting 3.1 kernels in 3.0 directory
223 # revisit when 3.1 is released 223 # revisit when 3.1 is released
224 if [[ ${KV_PATCH} -gt 0 ]]; then 224 if [[ ${KV_PATCH} -gt 0 ]]; then
225 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" 225 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
226 else 226 else
227 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}" 227 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}"
228 fi 228 fi
229 # KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}" 229 # KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}"
230 [[ -n "${K_LONGTERM}" ]] && 230 [[ -n "${K_LONGTERM}" ]] &&
231 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}" 231 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}"
232 else 232 else
233 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.0" 233 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.0"
234 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}" 234 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
235 [[ -n "${K_LONGTERM}" ]] && 235 [[ -n "${K_LONGTERM}" ]] &&
236 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 236 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
237 fi 237 fi
238 238
239 debug-print "KERNEL_BASE_URI is ${KERNEL_BASE_URI}"
240
239 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then 241 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then
240 # handle vanilla-sources-3.x.y correctly 242 # handle non genpatch using sources correctly
241 if [[ ${PN/-*} == "vanilla" && ${KV_PATCH} -gt 0 ]]; then 243 if [[ -z ${K_WANT_GENPATCHES} && -z ${K_GENPATCHES_VER} && ${KV_PATCH} -gt 0 ]]; then
242 KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.bz2" 244 KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.bz2"
243 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2" 245 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2"
244 fi 246 fi
245 KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.bz2" 247 KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.bz2"
246 else 248 else
1293 1295
1294 ABI="${KERNEL_ABI}" 1296 ABI="${KERNEL_ABI}"
1295 [[ ${ETYPE} == headers ]] && setup_headers 1297 [[ ${ETYPE} == headers ]] && setup_headers
1296 [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..." 1298 [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..."
1297} 1299}
1300
1301kernel-2_pkg_postrm() {
1302 echo
1303 ewarn "Note: Even though you have successfully unmerged "
1304 ewarn "your kernel package, directories in kernel source location: "
1305 ewarn "${ROOT}usr/src/linux-${KV_FULL}"
1306 ewarn "with modified files will remain behind. By design, package managers"
1307 ewarn "will not remove these modified files and the directories they reside in."
1308 echo
1309}
1310

Legend:
Removed from v.1.255  
changed lines
  Added in v.1.260

  ViewVC Help
Powered by ViewVC 1.1.20