/[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.260 Revision 1.277
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 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.260 2011/08/29 01:28:10 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.277 2012/06/24 17:52:38 mpagano 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>
81if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then 81if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then
82 export CTARGET=${CATEGORY/cross-} 82 export CTARGET=${CATEGORY/cross-}
83fi 83fi
84 84
85HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ ${HOMEPAGE}" 85HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ ${HOMEPAGE}"
86[[ -z ${LICENSE} ]] && \
87 LICENSE="GPL-2" 86: ${LICENSE:="GPL-2"}
88 87
89# This is the latest KV_PATCH of the deblob tool available from the 88# This is the latest KV_PATCH of the deblob tool available from the
90# libre-sources upstream. If you bump this, you MUST regenerate the Manifests 89# libre-sources upstream. If you bump this, you MUST regenerate the Manifests
91# for ALL kernel-2 consumer packages where deblob is available. 90# for ALL kernel-2 consumer packages where deblob is available.
92[[ -z ${DEBLOB_MAX_VERSION} ]] && DEBLOB_MAX_VERSION=38 91: ${DEBLOB_MAX_VERSION:=38}
93 92
94# No need to run scanelf/strip on kernel sources/headers (bug #134453). 93# No need to run scanelf/strip on kernel sources/headers (bug #134453).
95RESTRICT="binchecks strip" 94RESTRICT="binchecks strip"
96 95
97# set LINUX_HOSTCFLAGS if not already set 96# set LINUX_HOSTCFLAGS if not already set
98[[ -z ${LINUX_HOSTCFLAGS} ]] && \
99 LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include" 97: ${LINUX_HOSTCFLAGS:="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"}
100 98
101# debugging functions 99# debugging functions
102#============================================================== 100#==============================================================
103# this function exists only to help debug kernel-2.eclass 101# this function exists only to help debug kernel-2.eclass
104# if you are adding new functionality in, put a call to it 102# if you are adding new functionality in, put a call to it
116handle_genpatches() { 114handle_genpatches() {
117 local tarball 115 local tarball
118 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1 116 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1
119 117
120 debug-print "Inside handle_genpatches" 118 debug-print "Inside handle_genpatches"
121 local oldifs=${IFS}
122 export IFS="."
123 local OKV_ARRAY=( $OKV ) 119 local OKV_ARRAY
124 export IFS=${oldifs} 120 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
125 121
126 # for > 3.0 kernels, handle genpatches tarball name 122 # for > 3.0 kernels, handle genpatches tarball name
127 # genpatches for 3.0 and 3.0.1 might be named 123 # genpatches for 3.0 and 3.0.1 might be named
128 # genpatches-3.0-1.base.tar.bz2 and genpatches-3.0-2.base.tar.bz2 124 # genpatches-3.0-1.base.tar.bz2 and genpatches-3.0-2.base.tar.bz2
129 # respectively. Handle this. 125 # respectively. Handle this.
148 # this function will detect and set 144 # this function will detect and set
149 # - OKV: Original Kernel Version (2.6.0/2.6.0-test11) 145 # - OKV: Original Kernel Version (2.6.0/2.6.0-test11)
150 # - KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1) 146 # - KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1)
151 # - EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1) 147 # - EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1)
152 148
153 if [[ -n ${KV_FULL} ]]; then 149 # We've already run, so nothing to do here.
154 # we will set this for backwards compatibility. 150 [[ -n ${KV_FULL} ]] && return 0
155 KV=${KV_FULL}
156
157 # we know KV_FULL so lets stop here. but not without resetting S
158 S=${WORKDIR}/linux-${KV_FULL}
159 return
160 fi
161 151
162 # CKV is used as a comparison kernel version, which is used when 152 # CKV is used as a comparison kernel version, which is used when
163 # PV doesnt reflect the genuine kernel version. 153 # PV doesnt reflect the genuine kernel version.
164 # this gets set to the portage style versioning. ie: 154 # this gets set to the portage style versioning. ie:
165 # CKV=2.6.11_rc4 155 # CKV=2.6.11_rc4
170 OKV=${OKV/-r*} 160 OKV=${OKV/-r*}
171 OKV=${OKV/_p*} 161 OKV=${OKV/_p*}
172 162
173 KV_MAJOR=$(get_version_component_range 1 ${OKV}) 163 KV_MAJOR=$(get_version_component_range 1 ${OKV})
174 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1) 164 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1)
175 local oldifs=${IFS}
176 export IFS="."
177 local OKV_ARRAY=( $OKV ) 165 local OKV_ARRAY
178 export IFS=${oldifs} 166 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
179 167
180 # if KV_MAJOR >= 3, then we have no more KV_MINOR 168 # if KV_MAJOR >= 3, then we have no more KV_MINOR
181 #if [[ ${KV_MAJOR} -lt 3 ]]; then 169 #if [[ ${KV_MAJOR} -lt 3 ]]; then
182 if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then 170 if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
183 KV_MINOR=$(get_version_component_range 2 ${OKV}) 171 KV_MINOR=$(get_version_component_range 2 ${OKV})
217 205
218# if [[ ${KV_MAJOR} -ge 3 ]]; then 206# if [[ ${KV_MAJOR} -ge 3 ]]; then
219 if [[ ${#OKV_ARRAY[@]} -lt 3 ]]; then 207 if [[ ${#OKV_ARRAY[@]} -lt 3 ]]; then
220 KV_PATCH_ARR=(${KV_PATCH//\./ }) 208 KV_PATCH_ARR=(${KV_PATCH//\./ })
221 209
222 # at this point 080811, Linus is putting 3.1 kernels in 3.0 directory 210 # at this point 031412, Linus is putting all 3.x kernels in a
223 # revisit when 3.1 is released 211 # 3.x directory, may need to revisit when 4.x is released
224 if [[ ${KV_PATCH} -gt 0 ]]; then
225 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
226 else
227 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}" 212 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.x"
228 fi 213
229 # KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}"
230 [[ -n "${K_LONGTERM}" ]] && 214 [[ -n "${K_LONGTERM}" ]] &&
231 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}" 215 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}"
232 else 216 else
233 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.0" 217 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.0"
234 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}" 218 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
219 if [[ ${KV_MAJOR} -ge 3 ]]; then
220 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.x"
221 else
222 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
223 fi
224
235 [[ -n "${K_LONGTERM}" ]] && 225 [[ -n "${K_LONGTERM}" ]] &&
226 #KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm"
236 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 227 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
237 fi 228 fi
238 229
239 debug-print "KERNEL_BASE_URI is ${KERNEL_BASE_URI}" 230 debug-print "KERNEL_BASE_URI is ${KERNEL_BASE_URI}"
240 231
349 else 340 else
350 KV_PATCH_ARR=(${KV_PATCH//\./ }) 341 KV_PATCH_ARR=(${KV_PATCH//\./ })
351 OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" 342 OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
352 fi 343 fi
353 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2 344 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2
354 ${KERNEL_BASE_URI}/testing/linux-${OKV}.tar.bz2" 345 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
355 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2" 346 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2"
356 fi 347 fi
357 348
358 if [[ ${RELEASETYPE} == -git ]]; then 349 if [[ ${RELEASETYPE} == -git ]]; then
359 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.bz2 350 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.bz2
382 debug-print-kernel2-variables 373 debug-print-kernel2-variables
383 374
384 handle_genpatches 375 handle_genpatches
385} 376}
386 377
378# Note: duplicated in linux-info.eclass
387kernel_is() { 379kernel_is() {
388 # ALL of these should be set before we can safely continue this function. 380 # ALL of these should be set before we can safely continue this function.
389 # some of the sources have in the past had only one set. 381 # some of the sources have in the past had only one set.
390 local v n=0 382 local v n=0
391 for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done 383 for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done
392 [[ $n -eq 1 ]] && detect_version 384 [[ $n -eq 1 ]] && detect_version
393 unset v n 385 unset v n
394 386
395 # Now we can continue 387 # Now we can continue
396 local operator test value x=0 y=0 z=0 388 local operator test value
397 389
398 case ${1} in 390 case ${1#-} in
399 lt) operator="-lt"; shift;; 391 lt) operator="-lt"; shift;;
400 gt) operator="-gt"; shift;; 392 gt) operator="-gt"; shift;;
401 le) operator="-le"; shift;; 393 le) operator="-le"; shift;;
402 ge) operator="-ge"; shift;; 394 ge) operator="-ge"; shift;;
403 eq) operator="-eq"; shift;; 395 eq) operator="-eq"; shift;;
404 *) operator="-eq";; 396 *) operator="-eq";;
405 esac 397 esac
406
407 for x in ${@}; do
408 for((y=0; y<$((3 - ${#x})); y++)); do value="${value}0"; done
409 value="${value}${x}"
410 z=$((${z} + 1))
411
412 case ${z} in
413 1) for((y=0; y<$((3 - ${#KV_MAJOR})); y++)); do test="${test}0"; done;
414 test="${test}${KV_MAJOR}";;
415 2) for((y=0; y<$((3 - ${#KV_MINOR})); y++)); do test="${test}0"; done;
416 test="${test}${KV_MINOR}";;
417 3) for((y=0; y<$((3 - ${#KV_PATCH})); y++)); do test="${test}0"; done;
418 test="${test}${KV_PATCH}";;
419 *) die "Error in kernel-2_kernel_is(): Too many parameters.";; 398 [[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters"
420 esac
421 done
422 399
423 [ ${test} ${operator} ${value} ] && return 0 || return 1 400 : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH ))
401 : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} ))
402 [ ${test} ${operator} ${value} ]
424} 403}
425 404
426kernel_is_2_4() { 405kernel_is_2_4() {
427 kernel_is 2 4 406 kernel_is 2 4
428} 407}
434# Capture the sources type and set DEPENDs 413# Capture the sources type and set DEPENDs
435if [[ ${ETYPE} == sources ]]; then 414if [[ ${ETYPE} == sources ]]; then
436 DEPEND="!build? ( sys-apps/sed 415 DEPEND="!build? ( sys-apps/sed
437 >=sys-devel/binutils-2.11.90.0.31 )" 416 >=sys-devel/binutils-2.11.90.0.31 )"
438 RDEPEND="!build? ( >=sys-libs/ncurses-5.2 417 RDEPEND="!build? ( >=sys-libs/ncurses-5.2
439 sys-devel/make )" 418 sys-devel/make
419 dev-lang/perl )"
440 PDEPEND="!build? ( virtual/dev-manager )" 420 PDEPEND="!build? ( virtual/dev-manager )"
441 421
442 SLOT="${PVR}" 422 SLOT="${PVR}"
443 DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR:-$KV_PATCH} linux kernel" 423 DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR:-$KV_PATCH} linux kernel"
444 IUSE="symlink build" 424 IUSE="symlink build"
495 475
496 # Since we should NOT honour KBUILD_OUTPUT in headers 476 # Since we should NOT honour KBUILD_OUTPUT in headers
497 # lets unset it here. 477 # lets unset it here.
498 unset KBUILD_OUTPUT 478 unset KBUILD_OUTPUT
499 479
500 if [[ ${CTARGET} = ${CHOST} ]]; then
501 SLOT="0" 480 SLOT="0"
502 else
503 SLOT="${CTARGET}"
504 fi
505else 481else
506 eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\"" 482 eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
507 die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\"" 483 die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
508fi 484fi
509 485
567} 543}
568 544
569universal_unpack() { 545universal_unpack() {
570 debug-print "Inside universal_unpack" 546 debug-print "Inside universal_unpack"
571 547
572 local oldifs=${IFS}
573 export IFS="."
574 local OKV_ARRAY=( $OKV ) 548 local OKV_ARRAY
575 export IFS=${oldifs} 549 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
576 550
577 cd "${WORKDIR}" 551 cd "${WORKDIR}"
578 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then 552 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then
579 unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.bz2 553 unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.bz2
580 else 554 else
603 cd "${S}" 577 cd "${S}"
604 578
605 # remove all backup files 579 # remove all backup files
606 find . -iname "*~" -exec rm {} \; 2> /dev/null 580 find . -iname "*~" -exec rm {} \; 2> /dev/null
607 581
608 # fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox
609 # only do this for kernel < 2.6.27 since this file does not exist in later
610 # kernels
611 if [[ -n ${KV_MINOR} && ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
612 then
613 sed -i \
614 -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
615 "${S}"/arch/ppc/Makefile
616 else
617 sed -i \
618 -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
619 "${S}"/arch/powerpc/Makefile
620 fi
621} 582}
622 583
623unpack_set_extraversion() { 584unpack_set_extraversion() {
624 cd "${S}" 585 cd "${S}"
625 sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile 586 sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile
1127 done 1088 done
1128 fi 1089 fi
1129 done 1090 done
1130} 1091}
1131 1092
1132# sparc nastiness
1133#==============================================================
1134# This script generates the files in /usr/include/asm for sparc systems
1135# during installation of sys-kernel/linux-headers.
1136# Will no longer be needed when full 64 bit support is used on sparc64
1137# systems.
1138#
1139# Shamefully ripped from Debian
1140# ----------------------------------------------------------------------
1141
1142# Idea borrowed from RedHat's kernel package
1143
1144# This is gonna get replaced by something in multilib.eclass soon...
1145# --eradicator
1146generate_sparc_asm() {
1147 local name
1148
1149 cd $1 || die
1150 mkdir asm
1151
1152 for h in `( ls asm-sparc; ls asm-sparc64 ) | grep '\.h$' | sort -u`; do
1153 name="$(echo $h | tr a-z. A-Z_)"
1154 # common header
1155 echo "/* All asm/ files are generated and point to the corresponding
1156 * file in asm-sparc or asm-sparc64.
1157 */
1158
1159#ifndef __SPARCSTUB__${name}__
1160#define __SPARCSTUB__${name}__
1161" > asm/${h}
1162
1163 # common for sparc and sparc64
1164 if [ -f asm-sparc/$h -a -f asm-sparc64/$h ]; then
1165 echo "#ifdef __arch64__
1166#include <asm-sparc64/$h>
1167#else
1168#include <asm-sparc/$h>
1169#endif
1170" >> asm/${h}
1171
1172 # sparc only
1173 elif [ -f asm-sparc/$h ]; then
1174echo "#ifndef __arch64__
1175#include <asm-sparc/$h>
1176#endif
1177" >> asm/${h}
1178
1179 # sparc64 only
1180 else
1181echo "#ifdef __arch64__
1182#include <asm-sparc64/$h>
1183#endif
1184" >> asm/${h}
1185 fi
1186
1187 # common footer
1188 echo "#endif /* !__SPARCSTUB__${name}__ */" >> asm/${h}
1189 done
1190 return 0
1191}
1192
1193headers___fix() { 1093headers___fix() {
1194 # Voodoo to partially fix broken upstream headers. 1094 # Voodoo to partially fix broken upstream headers.
1195 # note: do not put inline/asm/volatile together (breaks "inline asm volatile") 1095 # note: do not put inline/asm/volatile together (breaks "inline asm volatile")
1196 sed -i \ 1096 sed -i \
1197 -e '/^\#define.*_TYPES_H/{:loop n; bloop}' \ 1097 -e '/^\#define.*_TYPES_H/{:loop n; bloop}' \
1241 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then 1141 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1242 cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed" 1142 cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed"
1243 cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed" 1143 cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed"
1244 chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob scripts failed" 1144 chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob scripts failed"
1245 fi 1145 fi
1146
1147 # fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox
1148 # only do this for kernel < 2.6.27 since this file does not exist in later
1149 # kernels
1150 if [[ -n ${KV_MINOR} && ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
1151 then
1152 sed -i \
1153 -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
1154 "${S}"/arch/ppc/Makefile
1155 else
1156 sed -i \
1157 -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
1158 "${S}"/arch/powerpc/Makefile
1159 fi
1246} 1160}
1247 1161
1248kernel-2_src_compile() { 1162kernel-2_src_compile() {
1249 cd "${S}" 1163 cd "${S}"
1250 [[ ${ETYPE} == headers ]] && compile_headers 1164 [[ ${ETYPE} == headers ]] && compile_headers
1278 [[ ${ETYPE} == sources ]] && postinst_sources 1192 [[ ${ETYPE} == sources ]] && postinst_sources
1279} 1193}
1280 1194
1281kernel-2_pkg_setup() { 1195kernel-2_pkg_setup() {
1282 if kernel_is 2 4; then 1196 if kernel_is 2 4; then
1283 if [ "$( gcc-major-version )" -eq "4" ] ; then 1197 if [[ $(gcc-major-version) -ge 4 ]] ; then
1284 echo 1198 echo
1285 ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!" 1199 ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!"
1286 ewarn "Either switch to another gcc-version (via gcc-config) or use a" 1200 ewarn "Either switch to another gcc-version (via gcc-config) or use a"
1287 ewarn "newer kernel that supports gcc-4." 1201 ewarn "newer kernel that supports gcc-4."
1288 echo 1202 echo
1297 [[ ${ETYPE} == headers ]] && setup_headers 1211 [[ ${ETYPE} == headers ]] && setup_headers
1298 [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..." 1212 [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..."
1299} 1213}
1300 1214
1301kernel-2_pkg_postrm() { 1215kernel-2_pkg_postrm() {
1216 # This warning only makes sense for kernel sources.
1217 [[ ${ETYPE} == headers ]] && return 0
1218
1219 # If there isn't anything left behind, then don't complain.
1220 [[ -e ${ROOT}usr/src/linux-${KV_FULL} ]] || return 0
1302 echo 1221 echo
1303 ewarn "Note: Even though you have successfully unmerged " 1222 ewarn "Note: Even though you have successfully unmerged "
1304 ewarn "your kernel package, directories in kernel source location: " 1223 ewarn "your kernel package, directories in kernel source location: "
1305 ewarn "${ROOT}usr/src/linux-${KV_FULL}" 1224 ewarn "${ROOT}usr/src/linux-${KV_FULL}"
1306 ewarn "with modified files will remain behind. By design, package managers" 1225 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." 1226 ewarn "will not remove these modified files and the directories they reside in."
1308 echo 1227 echo
1309} 1228}
1310

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

  ViewVC Help
Powered by ViewVC 1.1.20