Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 1/2] kernel-2.eclass: remove EAPI 6
Date: Fri, 15 Apr 2022 14:06:54
Message-Id: 20220415140616.891845-1-soap@gentoo.org
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/kernel-2.eclass | 26 ++++++++++++--------------
4 1 file changed, 12 insertions(+), 14 deletions(-)
5
6 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
7 index bd982d3a52c..51dabc4562d 100644
8 --- a/eclass/kernel-2.eclass
9 +++ b/eclass/kernel-2.eclass
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2021 Gentoo Authors
12 +# Copyright 1999-2022 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 # @ECLASS: kernel-2.eclass
16 @@ -8,7 +8,7 @@
17 # John Mylchreest <johnm@g.o>
18 # Mike Pagano <mpagano@g.o>
19 # <so many, many others, please add yourself>
20 -# @SUPPORTED_EAPIS: 6 7 8
21 +# @SUPPORTED_EAPIS: 7 8
22 # @BLURB: Eclass for kernel packages
23 # @DESCRIPTION:
24 # This is the kernel.eclass rewrite for a clean base regarding the 2.6
25 @@ -282,10 +282,9 @@
26 # that of course does not mean we're not willing to help.
27
28 inherit estack toolchain-funcs
29 -[[ ${EAPI} == 6 ]] && inherit eapi7-ver
30
31 case ${EAPI} in
32 - 6|7|8) ;;
33 + 7|8) ;;
34 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
35 esac
36
37 @@ -657,7 +656,6 @@ kernel_is() {
38
39 # Capture the sources type and set DEPENDs
40 if [[ ${ETYPE} == sources ]]; then
41 - [[ ${EAPI} == 6 ]] && DEPEND="!build? ( sys-apps/sed )" ||
42 BDEPEND="!build? ( sys-apps/sed )"
43 RDEPEND="!build? (
44 app-arch/cpio
45 @@ -863,10 +861,10 @@ install_headers() {
46 local ddir=$(kernel_header_destdir)
47
48 env_setup_xmakeopts
49 - emake headers_install INSTALL_HDR_PATH="${ED%/}"${ddir}/.. ${xmakeopts}
50 + emake headers_install INSTALL_HDR_PATH="${ED}"${ddir}/.. ${xmakeopts}
51
52 # let other packages install some of these headers
53 - rm -rf "${ED%/}"${ddir}/scsi || die #glibc/uclibc/etc...
54 + rm -rf "${ED}"${ddir}/scsi || die #glibc/uclibc/etc...
55 return 0
56 }
57
58 @@ -893,7 +891,7 @@ install_sources() {
59 done
60 fi
61
62 - mv "${WORKDIR}"/linux* "${ED%/}"/usr/src || die
63 + mv "${WORKDIR}"/linux* "${ED}"/usr/src || die
64
65 if [[ -n ${UNIPATCH_DOCS} ]]; then
66 for i in ${UNIPATCH_DOCS}; do
67 @@ -933,15 +931,15 @@ postinst_sources() {
68
69 # if we are to forcably symlink, delete it if it already exists first.
70 if [[ ${K_SYMLINK} -gt 0 ]]; then
71 - if [[ -e ${EROOT%/}/usr/src/linux && ! -L ${EROOT%/}/usr/src/linux ]] ; then
72 - die "${EROOT%/}/usr/src/linux exist and is not a symlink"
73 + if [[ -e ${EROOT}/usr/src/linux && ! -L ${EROOT}/usr/src/linux ]] ; then
74 + die "${EROOT}/usr/src/linux exist and is not a symlink"
75 fi
76
77 - ln -snf linux-${KV_FULL} "${EROOT%/}"/usr/src/linux || die
78 + ln -snf linux-${KV_FULL} "${EROOT}"/usr/src/linux || die
79 fi
80
81 # Don't forget to make directory for sysfs
82 - [[ ! -d ${EROOT%/}/sys ]] && kernel_is 2 6 && { mkdir "${EROOT%/}"/sys || die ; }
83 + [[ ! -d ${EROOT}/sys ]] && kernel_is 2 6 && { mkdir "${EROOT}"/sys || die ; }
84
85 elog "If you are upgrading from a previous kernel, you may be interested"
86 elog "in the following document:"
87 @@ -1537,10 +1535,10 @@ kernel-2_pkg_postrm() {
88 [[ ${ETYPE} == headers ]] && return 0
89
90 # If there isn't anything left behind, then don't complain.
91 - [[ -e ${EROOT%/}/usr/src/linux-${KV_FULL} ]] || return 0
92 + [[ -e ${EROOT}/usr/src/linux-${KV_FULL} ]] || return 0
93 ewarn "Note: Even though you have successfully unmerged "
94 ewarn "your kernel package, directories in kernel source location: "
95 - ewarn "${EROOT%/}/usr/src/linux-${KV_FULL}"
96 + ewarn "${EROOT}/usr/src/linux-${KV_FULL}"
97 ewarn "with modified files will remain behind. By design, package managers"
98 ewarn "will not remove these modified files and the directories they reside in."
99 ewarn "For more detailed kernel removal instructions, please see: "
100 --
101 2.35.1

Replies

Subject Author
[gentoo-dev] [PATCH 2/2] kernel-2.eclass: fix spelling David Seifert <soap@g.o>