From: "Mike Pagano (mpagano)" <mpagano@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: kernel-2.eclass
Date: Fri, 3 Jun 2011 13:07:33 +0000 (UTC) [thread overview]
Message-ID: <20110603130733.7C16C2004E@flycatcher.gentoo.org> (raw)
mpagano 11/06/03 13:07:33
Modified: kernel-2.eclass
Log:
Add support for 2 part versioning. bug #369533
Revision Changes Path
1.252 eclass/kernel-2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kernel-2.eclass?rev=1.252&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kernel-2.eclass?rev=1.252&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kernel-2.eclass?r1=1.251&r2=1.252
Index: kernel-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -r1.251 -r1.252
--- kernel-2.eclass 30 Apr 2011 17:07:50 -0000 1.251
+++ kernel-2.eclass 3 Jun 2011 13:07:33 -0000 1.252
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.251 2011/04/30 17:07:50 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.252 2011/06/03 13:07:33 mpagano Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
@@ -151,29 +151,51 @@
OKV=${OKV/_p*}
KV_MAJOR=$(get_version_component_range 1 ${OKV})
- KV_MINOR=$(get_version_component_range 2 ${OKV})
- KV_PATCH=$(get_version_component_range 3 ${OKV})
- if [[ ${KV_MAJOR}${KV_MINOR}${KV_PATCH} -ge 269 ]]; then
- KV_EXTRA=$(get_version_component_range 4- ${OKV})
- KV_EXTRA=${KV_EXTRA/[-_]*}
+ # if KV_MAJOR >= 3, then we have no more KV_MINOR
+ if [[ ${KV_MAJOR} -lt 3 ]]; then
+ KV_MINOR=$(get_version_component_range 2 )
+ KV_PATCH=$(get_version_component_range 3 ${OKV})
+ if [[ ${KV_MAJOR}${KV_MINOR}${KV_PATCH} -ge 269 ]]; then
+ KV_EXTRA=$(get_version_component_range 4- ${OKV})
+ KV_EXTRA=${KV_EXTRA/[-_]*}
+ else
+ KV_PATCH=$(get_version_component_range 3- ${OKV})
+ fi
else
- KV_PATCH=$(get_version_component_range 3- ${OKV})
+ KV_PATCH=$(get_version_component_range 2 ${OKV})
+ KV_EXTRA=$(get_version_component_range 3- ${OKV})
+ KV_EXTRA=${KV_EXTRA/[-_]*}
fi
+
KV_PATCH=${KV_PATCH/[-_]*}
local v n=0 missing
- for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
- [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
- done
+ if [[ ${KV_MAJOR} -lt 3 ]]; then
+ for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
+ [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
+ done
+ else
+ for v in CKV OKV KV_{MAJOR,PATCH} ; do
+ [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
+ done
+ fi
+
[[ $n -eq 1 ]] && \
eerror "Missing variables: ${missing}" && \
die "Failed to extract kernel version (try explicit CKV in ebuild)!"
unset v n missing
- 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}"
+ if [[ ${KV_MAJOR} -ge 3 ]]; then
+ KV_PATCH_ARR=(${KV_PATCH//\./ })
+ KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_PATCH_ARR}"
+ [[ -n "${K_LONGTERM}" ]] &&
+ KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}"
+ else
+ 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}"
+ fi
KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
@@ -184,7 +206,7 @@
# We cannot trivally call kernel_is here, because it calls us to detect the
# version
#kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
- [ $(($KV_MAJOR * 1000 + $KV_MINOR)) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
+ [ $(($KV_MAJOR * 1000 + ${KV_MINOR:-0})) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
RELEASETYPE=${RELEASE//[0-9]}
# Now we know that RELEASE is the -rc/-git
@@ -221,8 +243,13 @@
# The only messing around which should actually effect this is for KV_EXTRA
# since this has to limit OKV to MAJ.MIN.PAT and strip EXTRA off else
# KV_FULL evaluates to MAJ.MIN.PAT.EXT.EXT after EXTRAVERSION
+
if [[ -n ${KV_EXTRA} ]]; then
- OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ if [[ -n ${KV_MINOR} ]]; then
+ OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ else
+ OKV="${KV_MAJOR}.${KV_PATCH}"
+ fi
KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.bz2
${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2"
@@ -242,28 +269,66 @@
# will pull:
# linux-2.6.10.tar.bz2 & patch-2.6.11-rc3.bz2 & patch-2.6.11-rc3-git2.bz2
- if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
- OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
- 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 [[ ${KV_MAJOR}${KV_MINOR} -eq 26 ]]; then
- if [[ ${RELEASETYPE} == -git ]]; then
- 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 ]] || [[ ${RELEASETYPE} == -pre ]]; then
+ OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
+ 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="${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="${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
+ else
+ if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
+ if [[ ${KV_MAJOR}${KV_PATCH} -eq 30 ]]; then
+ OKV="2.6.39"
+ else
+ KV_PATCH_ARR=(${KV_PATCH//\./ })
+ OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
+ fi
+ KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2
+ ${KERNEL_BASE_URI}/testing/linux-${OKV}.tar.bz2"
+ UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2"
+ fi
+
+ if [[ ${RELEASETYPE} == -git ]]; then
+ 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
+ if [[ ${KV_MAJOR}${KV_PATCH} -eq 30 ]]; then
+ OKV="2.6.39"
+ else
+ KV_PATCH_ARR=(${KV_PATCH//\./ })
+ OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
+ fi
+ KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.bz2
+ ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.bz2
+ ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
+
+ UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.bz2 ${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.bz2"
+ fi
- if [[ ${RELEASETYPE} == -rc-git ]]; then
- OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
- 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
+
debug-print-kernel2-variables
handle_genpatches
@@ -325,7 +390,7 @@
PDEPEND="!build? ( virtual/dev-manager )"
SLOT="${PVR}"
- DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR} linux kernel"
+ DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR:-$KV_PATCH} linux kernel"
IUSE="symlink build"
# Bug #266157, deblob for libre support
@@ -341,7 +406,12 @@
# stripped
LICENSE="${LICENSE} !deblob? ( freedist )"
- DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ if [[ -n KV_MINOR ]]; then
+ DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ else
+ DEBLOB_PV="${KV_MAJOR}.${KV_PATCH}"
+ fi
+
DEBLOB_A="deblob-${DEBLOB_PV}"
DEBLOB_CHECK_A="deblob-check-${DEBLOB_PV}"
DEBLOB_HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
@@ -460,7 +530,7 @@
# fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox
# only do this for kernel < 2.6.27 since this file does not exist in later
# kernels
- if [[ ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
+ if [[ -n ${KV_MINOR} && ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
then
sed -i \
-e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
@@ -708,18 +778,19 @@
KV_MAJOR=$(get_version_component_range 1 ${OKV})
KV_MINOR=$(get_version_component_range 2 ${OKV})
KV_PATCH=$(get_version_component_range 3 ${OKV})
- if [[ "$(tc-arch)" = "sparc" ]] \
- && [[ ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]]
- then
- echo
- elog "NOTE: Since 2.6.25 the kernel Makefile has changed in a way that"
- elog "you now need to do"
- elog " make CROSS_COMPILE=sparc64-unknown-linux-gnu-"
- elog "instead of just"
- elog " make"
- elog "to compile the kernel. For more information please browse to"
- elog "https://bugs.gentoo.org/show_bug.cgi?id=214765"
- echo
+ if [[ "$(tc-arch)" = "sparc" ]]; then
+ if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]]
+ then
+ echo
+ elog "NOTE: Since 2.6.25 the kernel Makefile has changed in a way that"
+ elog "you now need to do"
+ elog " make CROSS_COMPILE=sparc64-unknown-linux-gnu-"
+ elog "instead of just"
+ elog " make"
+ elog "to compile the kernel. For more information please browse to"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=214765"
+ echo
+ fi
fi
}
@@ -844,7 +915,7 @@
# do not apply fbcondecor patch to sparc/sparc64 as it breaks boot
# bug #272676
if [[ "$(tc-arch)" = "sparc" || "$(tc-arch)" = "sparc64" ]]; then
- if [[ ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.28 ]]; then
+ if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.28 ]]; then
UNIPATCH_DROP="${UNIPATCH_DROP} *_fbcondecor-0.9.6.patch"
echo
ewarn "fbcondecor currently prevents sparc/sparc64 from booting"
next reply other threads:[~2011-06-03 13:07 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 13:07 Mike Pagano (mpagano) [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-02-13 1:30 [gentoo-commits] gentoo-x86 commit in eclass: kernel-2.eclass Mike Pagano (mpagano)
2013-11-22 13:35 Mike Frysinger (vapier)
2013-07-31 21:25 Julian Ospald (hasufell)
2011-12-10 7:57 Mike Frysinger (vapier)
2011-12-08 19:39 Mike Frysinger (vapier)
2011-12-02 4:34 Mike Frysinger (vapier)
2011-12-02 4:19 Mike Frysinger (vapier)
2011-12-02 2:37 Mike Frysinger (vapier)
2011-12-02 2:28 Mike Frysinger (vapier)
2011-12-02 1:54 Mike Frysinger (vapier)
2011-12-02 0:15 Mike Frysinger (vapier)
2011-12-01 23:34 Mike Frysinger (vapier)
2011-12-01 23:32 Mike Frysinger (vapier)
2011-10-24 23:58 Mike Pagano (mpagano)
2011-08-19 13:26 Mike Pagano (mpagano)
2011-08-15 21:38 Mike Pagano (mpagano)
2011-08-11 14:09 Mike Pagano (mpagano)
2011-08-08 23:14 Mike Pagano (mpagano)
2011-08-08 14:14 Mike Pagano (mpagano)
2011-06-03 20:20 Mike Pagano (mpagano)
2011-04-30 17:07 Ulrich Mueller (ulm)
2011-04-21 12:34 Mike Pagano (mpagano)
2011-04-14 6:10 Ulrich Mueller (ulm)
2011-03-22 0:39 Mike Pagano (mpagano)
2011-03-19 18:15 Samuli Suominen (ssuominen)
2011-03-15 13:16 Mike Pagano (mpagano)
2011-03-10 1:04 Mike Frysinger (vapier)
2011-02-18 20:07 Mike Pagano (mpagano)
2010-11-28 5:07 Robin H. Johnson (robbat2)
2010-11-26 23:41 Mike Pagano (mpagano)
2010-09-17 21:44 Tomas Chvatal (scarabeus)
2010-08-03 18:31 Robin H. Johnson (robbat2)
2010-08-03 17:22 Robin H. Johnson (robbat2)
2010-07-30 0:44 Mike Pagano (mpagano)
2010-07-19 20:19 Mike Frysinger (vapier)
2010-06-05 18:49 Mike Frysinger (vapier)
2010-05-28 21:00 Robin H. Johnson (robbat2)
2010-05-20 23:11 Robin H. Johnson (robbat2)
2010-05-02 11:05 Ulrich Mueller (ulm)
2010-05-02 8:48 Robin H. Johnson (robbat2)
2010-04-26 8:05 Robin H. Johnson (robbat2)
2010-04-26 7:26 Robin H. Johnson (robbat2)
2010-04-26 7:15 Robin H. Johnson (robbat2)
2010-04-26 6:48 Robin H. Johnson (robbat2)
2010-04-26 6:46 Robin H. Johnson (robbat2)
2010-04-26 6:44 Robin H. Johnson (robbat2)
2010-04-01 21:12 Robin H. Johnson (robbat2)
2009-12-13 18:56 Mike Pagano (mpagano)
2009-11-25 18:46 Mike Pagano (mpagano)
2009-10-20 19:51 Robin H. Johnson (robbat2)
2009-10-20 19:17 Zac Medico (zmedico)
2009-10-11 11:43 Markus Meier (maekke)
2009-08-28 16:28 Mike Pagano (mpagano)
2008-11-13 23:50 Mike Pagano (mpagano)
2008-08-07 2:05 Mike Pagano (mpagano)
2008-07-09 19:52 Friedrich Oslage (bluebird)
2008-06-01 23:29 Mike Pagano (mpagano)
2008-05-03 16:07 Daniel Drake (dsd)
2008-04-28 19:22 Mike Pagano (mpagano)
2008-04-12 22:45 Mike Frysinger (vapier)
2008-04-05 12:29 Mike Pagano (mpagano)
2008-03-01 18:47 Bo Oersted Andresen (zlin)
2007-12-17 16:05 Daniel Drake (dsd)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110603130733.7C16C2004E@flycatcher.gentoo.org \
--to=mpagano@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox