summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pagano <mpagano@gentoo.org>2011-02-18 20:07:18 +0000
committerMike Pagano <mpagano@gentoo.org>2011-02-18 20:07:18 +0000
commit021a9af22bd92adf3802fb6d6f3bf44b938f54fc (patch)
treed5fd8b808fd56d2883e09b8cc03bd3ba983fcc9b
parentAdd elog about rar archive support (diff)
downloadhistorical-021a9af22bd92adf3802fb6d6f3bf44b938f54fc.tar.gz
historical-021a9af22bd92adf3802fb6d6f3bf44b938f54fc.tar.bz2
historical-021a9af22bd92adf3802fb6d6f3bf44b938f54fc.zip
Adding support for longterm kernels.
-rw-r--r--eclass/kernel-2.eclass31
1 files changed, 19 insertions, 12 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 196cffd0789d..eed8ba3654fd 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.243 2010/11/28 05:07:28 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.244 2011/02/18 20:07:18 mpagano Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
@@ -52,7 +52,9 @@
# If false, either optional deblobbing will be available
# or the license will note the inclusion of freedist
# code.
-
+# K_LONGTERM - If set, the eclass will search for the kernel source
+# in the long term directories on the upstream servers
+# as the location has been changed by upstream
# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
# can be supported by the headers ebuild
@@ -169,7 +171,11 @@ detect_version() {
die "Failed to extract kernel version (try explicit CKV in ebuild)!"
unset v n missing
- KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
+ KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
+ [[ -n "${K_LONGTERM}" ]] &&
+ KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+
+ KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
RELEASE=${CKV/${OKV}}
RELEASE=${RELEASE/_beta}
@@ -217,8 +223,8 @@ detect_version() {
# KV_FULL evaluates to MAJ.MIN.PAT.EXT.EXT after EXTRAVERSION
if [[ -n ${KV_EXTRA} ]]; then
OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
- KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${CKV}.bz2
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.tar.bz2"
+ KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.bz2
+ ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2"
fi
@@ -238,22 +244,23 @@ detect_version() {
if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
- KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/patch-${CKV//_/-}.bz2
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
+ KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2
+ ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2"
fi
if [[ ${RELEASETYPE} == -git ]]; then
- KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${OKV}${RELEASE}.bz2
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
+ KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.bz2
+ ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.bz2"
fi
if [[ ${RELEASETYPE} == -rc-git ]]; then
OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
- KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
+ KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
+ ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2
+ ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
+
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2 ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2"
fi