Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/vanilla-kernel/
Date: Mon, 23 Dec 2019 19:10:56
Message-Id: 1577128246.83e6ab2ec349f741204d90f8fb91eea8e0fcd54f.mgorny@gentoo
1 commit: 83e6ab2ec349f741204d90f8fb91eea8e0fcd54f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 23 19:08:52 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 23 19:10:46 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83e6ab2e
7
8 sys-kernel/vanilla-kernel: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-kernel/vanilla-kernel/Manifest | 4 -
13 .../vanilla-kernel/vanilla-kernel-5.4.2.ebuild | 168 -------------------
14 .../vanilla-kernel/vanilla-kernel-5.4.3.ebuild | 168 -------------------
15 .../vanilla-kernel/vanilla-kernel-5.4.5.ebuild | 181 ---------------------
16 4 files changed, 521 deletions(-)
17
18 diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
19 index 47bd736b996..7d8a084f2de 100644
20 --- a/sys-kernel/vanilla-kernel/Manifest
21 +++ b/sys-kernel/vanilla-kernel/Manifest
22 @@ -1,6 +1,2 @@
23 -DIST linux-5.4.1.arch1-1.config 241587 BLAKE2B 71db76bf30a8d7f4dc680399b9f9fbb4236d1938bb86e23eb1ab236a667a959fc1cff788f7e432c43a6173e1bac4e20f3a6c3391d84275d46f1f66bd338bf538 SHA512 34d66658963dbd72fa3e96f2c5d5bccafb781fa14f6ebafe7859953929ba2fbb112f1435ca68cec8389d789cf0efa81d5fc0f5ac6dfa23a704348ab83709e9db
24 -DIST linux-5.4.2.tar.xz 109441848 BLAKE2B 126e00ef6a084049089f6733e480e68271083cc5f88bd2c64cba198c983c78c3e5f61a9cded8357d1767c4faadec5ab81c1a7231cc65f41913de2820e02a3467 SHA512 42bd0e1887555cf92d424243d85bb39911669da814b0201503319604f1d45f7f0b45d535ee08ca7831f47047db96125496159945c3cd05dac491e0f5e0685854
25 -DIST linux-5.4.3.tar.xz 109443116 BLAKE2B c874dc8d2fcf344efc6111071e9a54128d5b05fda2aa4ff56b684b68c5b61d58105d3cbf012f7005ed01f8d4350cf23096befc7f9357acbb0d003c5e8dc2bbd7 SHA512 bbdf4179c5263f313aac56a75ebe14da6d05128b27b3d84305743605745bb0ffa872dc6fd349a9f066676ab39ed395e512bb1b27fec47a99d6f002cd25f64ed5
26 DIST linux-5.4.4.arch1-1.config 241587 BLAKE2B 71db76bf30a8d7f4dc680399b9f9fbb4236d1938bb86e23eb1ab236a667a959fc1cff788f7e432c43a6173e1bac4e20f3a6c3391d84275d46f1f66bd338bf538 SHA512 34d66658963dbd72fa3e96f2c5d5bccafb781fa14f6ebafe7859953929ba2fbb112f1435ca68cec8389d789cf0efa81d5fc0f5ac6dfa23a704348ab83709e9db
27 -DIST linux-5.4.5.tar.xz 109435988 BLAKE2B 881ff4047a404b7754fc56f16b6a4ab66ba6beb4ef6d8c2601f99c57ac47b0d6f52de95aafbd8346e0fce6fc5fa63cb60aa7876d1f5f4ad9344e8a659941bf22 SHA512 462bddae3e0410f8a65393631fac4bcde19def55a21890d88ed4929948cbbb95ec4d3a310f507c71588269598c518b0072f2fc536be116337b627da6ae151e5e
28 DIST linux-5.4.6.tar.xz 109454640 BLAKE2B 8619492fedd4ae489a811561f72285b69deb827bb1db1f65be2a128d3bcbb69bdeec6b73650e1e8f72b18e5016c2df092bc77ee38be756d35f2903ecf0db1687 SHA512 9e1153e80303d6d5016856a25f3757259a3a428bad11208192315088d1f1a09957f5b8e966ab8cb5842ce1a740760f87474066294f8b410e9c44c810838bcdac
29
30 diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild
31 deleted file mode 100644
32 index e4aec6aa7ea..00000000000
33 --- a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild
34 +++ /dev/null
35 @@ -1,168 +0,0 @@
36 -# Copyright 2019 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=7
40 -
41 -inherit mount-boot savedconfig toolchain-funcs
42 -
43 -MY_P=linux-${PV}
44 -CONFIG_VER=5.4.1.arch1-1
45 -CONFIG_HASH=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e
46 -
47 -DESCRIPTION="Linux kernel built from vanilla upstream sources"
48 -HOMEPAGE="https://www.kernel.org/"
49 -SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/${MY_P}.tar.xz
50 - https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${CONFIG_HASH}
51 - -> linux-${CONFIG_VER}.config"
52 -S=${WORKDIR}/${MY_P}
53 -
54 -LICENSE="GPL-2"
55 -SLOT="${PV}"
56 -KEYWORDS="~amd64"
57 -IUSE="+initramfs"
58 -
59 -# install-DEPEND actually
60 -# note: we need installkernel with initramfs support!
61 -RDEPEND="
62 - || (
63 - sys-kernel/installkernel-gentoo
64 - sys-kernel/installkernel-systemd-boot
65 - )
66 - initramfs? ( sys-kernel/dracut )"
67 -
68 -pkg_pretend() {
69 - mount-boot_pkg_pretend
70 -
71 - ewarn "This is an experimental package. The built kernel and/or initramfs"
72 - ewarn "may not work at all or fail with your bootloader configuration. Please"
73 - ewarn "make sure to keep a backup kernel available before testing it."
74 -}
75 -
76 -src_configure() {
77 - # force ld.bfd if we can find it easily
78 - local LD="$(tc-getLD)"
79 - if type -P "${LD}.bfd" &>/dev/null; then
80 - LD+=.bfd
81 - fi
82 -
83 - MAKEARGS=(
84 - V=1
85 -
86 - HOSTCC="$(tc-getCC)"
87 - HOSTCXX="$(tc-getCXX)"
88 - HOSTCFLAGS="${CFLAGS}"
89 - HOSTLDFLAGS="${LDFLAGS}"
90 -
91 - AS="$(tc-getAS)"
92 - CC="$(tc-getCC)"
93 - LD="${LD}"
94 - AR="$(tc-getAR)"
95 - NM="$(tc-getNM)"
96 - STRIP=":"
97 - OBJCOPY="$(tc-getOBJCOPY)"
98 - OBJDUMP="$(tc-getOBJDUMP)"
99 -
100 - # we need to pass it to override colliding Gentoo envvar
101 - ARCH=x86
102 - )
103 -
104 - cp "${DISTDIR}"/linux-${CONFIG_VER}.config .config || die
105 - # while Arch config is cool, we don't want gcc plugins as they
106 - # break distcc
107 - sed -i -e '/GCC_PLUGIN/d' .config || die
108 - # module compression prevents us from stripping them post-inst
109 - sed -i -e '/MODULE_COMPRESS/d' .config || die
110 - # shove our theft under the carpet!
111 - sed -i -e '/HOSTNAME/s:archlinux:gentoo:' .config || die
112 - restore_config .config
113 -
114 - mkdir -p "${WORKDIR}"/modprep || die
115 - mv .config "${WORKDIR}"/modprep/ || die
116 - emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
117 - emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare
118 - cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die
119 -}
120 -
121 -src_compile() {
122 - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
123 -}
124 -
125 -src_test() {
126 - :
127 -}
128 -
129 -src_install() {
130 - # do not use 'make install' as it behaves differently based
131 - # on what kind of installkernel is installed
132 - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
133 - INSTALL_MOD_PATH="${ED}" modules_install
134 -
135 - # install headers and prepared objects on top of them
136 - # note: we're using mv rather than doins to save space and time
137 - find -name '*.c' -delete || die
138 - rm -r Documentation || die
139 - dodir /usr/src
140 - cd "${WORKDIR}" || die
141 - mv "${S}" "${ED}"/usr/src/ || die
142 - # strip out-of-source build stuffs from modprep
143 - find modprep -type f '(' \
144 - -name Makefile -o \
145 - -name '*.[ao]' -o \
146 - '(' -name '.*' -a -not -name '.config' ')' \
147 - ')' -delete || die
148 - rm modprep/source || die
149 - cp -pR modprep/. "${ED}/usr/src/linux-${PV}"/ || die
150 -
151 - # install the kernel and files needed for module builds
152 - cp build/{arch/x86/boot/bzImage,System.map,Module.symvers} \
153 - "${ED}/usr/src/linux-${PV}"/ || die
154 -
155 - # fix source tree and build dir symlinks
156 - dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/build
157 - dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/source
158 -
159 - save_config build/.config
160 -}
161 -
162 -pkg_preinst() {
163 - :
164 -}
165 -
166 -pkg_postinst() {
167 - if [[ -z ${ROOT} ]]; then
168 - mount-boot_pkg_preinst
169 -
170 - local fail=
171 -
172 - if use initramfs; then
173 - ebegin "Building initramfs via dracut"
174 - # putting it alongside kernel image as 'initrd' makes
175 - # kernel-install happier
176 - dracut --force "${EROOT}/usr/src/linux-${PV}/initrd" "${PV}"
177 - eend ${?} || die "Building initramfs failed"
178 - fi
179 -
180 - ebegin "Installing the kernel via installkernel"
181 - # note: .config is taken relatively to System.map;
182 - # initrd relatively to bzImage
183 - installkernel "${PV}" \
184 - "${EROOT}/usr/src/linux-${PV}/bzImage" \
185 - "${EROOT}/usr/src/linux-${PV}/System.map"
186 - eend ${?} || fail=1
187 -
188 - [[ ${fail} ]] && die "Installing the kernel failed"
189 -
190 - # TODO: update /usr/src/linux symlink?
191 - fi
192 -
193 - savedconfig_pkg_postinst
194 -}
195 -
196 -pkg_prerm() {
197 - :
198 -}
199 -
200 -pkg_postrm() {
201 - rm -f "${EROOT}/usr/src/linux-${PV}/initrd" &&
202 - rmdir --ignore-fail-on-non-empty "${EROOT}/usr/src/linux-${PV}"
203 -}
204
205 diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild
206 deleted file mode 100644
207 index e4aec6aa7ea..00000000000
208 --- a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild
209 +++ /dev/null
210 @@ -1,168 +0,0 @@
211 -# Copyright 2019 Gentoo Authors
212 -# Distributed under the terms of the GNU General Public License v2
213 -
214 -EAPI=7
215 -
216 -inherit mount-boot savedconfig toolchain-funcs
217 -
218 -MY_P=linux-${PV}
219 -CONFIG_VER=5.4.1.arch1-1
220 -CONFIG_HASH=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e
221 -
222 -DESCRIPTION="Linux kernel built from vanilla upstream sources"
223 -HOMEPAGE="https://www.kernel.org/"
224 -SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/${MY_P}.tar.xz
225 - https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${CONFIG_HASH}
226 - -> linux-${CONFIG_VER}.config"
227 -S=${WORKDIR}/${MY_P}
228 -
229 -LICENSE="GPL-2"
230 -SLOT="${PV}"
231 -KEYWORDS="~amd64"
232 -IUSE="+initramfs"
233 -
234 -# install-DEPEND actually
235 -# note: we need installkernel with initramfs support!
236 -RDEPEND="
237 - || (
238 - sys-kernel/installkernel-gentoo
239 - sys-kernel/installkernel-systemd-boot
240 - )
241 - initramfs? ( sys-kernel/dracut )"
242 -
243 -pkg_pretend() {
244 - mount-boot_pkg_pretend
245 -
246 - ewarn "This is an experimental package. The built kernel and/or initramfs"
247 - ewarn "may not work at all or fail with your bootloader configuration. Please"
248 - ewarn "make sure to keep a backup kernel available before testing it."
249 -}
250 -
251 -src_configure() {
252 - # force ld.bfd if we can find it easily
253 - local LD="$(tc-getLD)"
254 - if type -P "${LD}.bfd" &>/dev/null; then
255 - LD+=.bfd
256 - fi
257 -
258 - MAKEARGS=(
259 - V=1
260 -
261 - HOSTCC="$(tc-getCC)"
262 - HOSTCXX="$(tc-getCXX)"
263 - HOSTCFLAGS="${CFLAGS}"
264 - HOSTLDFLAGS="${LDFLAGS}"
265 -
266 - AS="$(tc-getAS)"
267 - CC="$(tc-getCC)"
268 - LD="${LD}"
269 - AR="$(tc-getAR)"
270 - NM="$(tc-getNM)"
271 - STRIP=":"
272 - OBJCOPY="$(tc-getOBJCOPY)"
273 - OBJDUMP="$(tc-getOBJDUMP)"
274 -
275 - # we need to pass it to override colliding Gentoo envvar
276 - ARCH=x86
277 - )
278 -
279 - cp "${DISTDIR}"/linux-${CONFIG_VER}.config .config || die
280 - # while Arch config is cool, we don't want gcc plugins as they
281 - # break distcc
282 - sed -i -e '/GCC_PLUGIN/d' .config || die
283 - # module compression prevents us from stripping them post-inst
284 - sed -i -e '/MODULE_COMPRESS/d' .config || die
285 - # shove our theft under the carpet!
286 - sed -i -e '/HOSTNAME/s:archlinux:gentoo:' .config || die
287 - restore_config .config
288 -
289 - mkdir -p "${WORKDIR}"/modprep || die
290 - mv .config "${WORKDIR}"/modprep/ || die
291 - emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
292 - emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare
293 - cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die
294 -}
295 -
296 -src_compile() {
297 - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
298 -}
299 -
300 -src_test() {
301 - :
302 -}
303 -
304 -src_install() {
305 - # do not use 'make install' as it behaves differently based
306 - # on what kind of installkernel is installed
307 - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
308 - INSTALL_MOD_PATH="${ED}" modules_install
309 -
310 - # install headers and prepared objects on top of them
311 - # note: we're using mv rather than doins to save space and time
312 - find -name '*.c' -delete || die
313 - rm -r Documentation || die
314 - dodir /usr/src
315 - cd "${WORKDIR}" || die
316 - mv "${S}" "${ED}"/usr/src/ || die
317 - # strip out-of-source build stuffs from modprep
318 - find modprep -type f '(' \
319 - -name Makefile -o \
320 - -name '*.[ao]' -o \
321 - '(' -name '.*' -a -not -name '.config' ')' \
322 - ')' -delete || die
323 - rm modprep/source || die
324 - cp -pR modprep/. "${ED}/usr/src/linux-${PV}"/ || die
325 -
326 - # install the kernel and files needed for module builds
327 - cp build/{arch/x86/boot/bzImage,System.map,Module.symvers} \
328 - "${ED}/usr/src/linux-${PV}"/ || die
329 -
330 - # fix source tree and build dir symlinks
331 - dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/build
332 - dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/source
333 -
334 - save_config build/.config
335 -}
336 -
337 -pkg_preinst() {
338 - :
339 -}
340 -
341 -pkg_postinst() {
342 - if [[ -z ${ROOT} ]]; then
343 - mount-boot_pkg_preinst
344 -
345 - local fail=
346 -
347 - if use initramfs; then
348 - ebegin "Building initramfs via dracut"
349 - # putting it alongside kernel image as 'initrd' makes
350 - # kernel-install happier
351 - dracut --force "${EROOT}/usr/src/linux-${PV}/initrd" "${PV}"
352 - eend ${?} || die "Building initramfs failed"
353 - fi
354 -
355 - ebegin "Installing the kernel via installkernel"
356 - # note: .config is taken relatively to System.map;
357 - # initrd relatively to bzImage
358 - installkernel "${PV}" \
359 - "${EROOT}/usr/src/linux-${PV}/bzImage" \
360 - "${EROOT}/usr/src/linux-${PV}/System.map"
361 - eend ${?} || fail=1
362 -
363 - [[ ${fail} ]] && die "Installing the kernel failed"
364 -
365 - # TODO: update /usr/src/linux symlink?
366 - fi
367 -
368 - savedconfig_pkg_postinst
369 -}
370 -
371 -pkg_prerm() {
372 - :
373 -}
374 -
375 -pkg_postrm() {
376 - rm -f "${EROOT}/usr/src/linux-${PV}/initrd" &&
377 - rmdir --ignore-fail-on-non-empty "${EROOT}/usr/src/linux-${PV}"
378 -}
379
380 diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.5.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.5.ebuild
381 deleted file mode 100644
382 index f8f219fc594..00000000000
383 --- a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.5.ebuild
384 +++ /dev/null
385 @@ -1,181 +0,0 @@
386 -# Copyright 2019 Gentoo Authors
387 -# Distributed under the terms of the GNU General Public License v2
388 -
389 -EAPI=7
390 -
391 -inherit mount-boot savedconfig toolchain-funcs
392 -
393 -MY_P=linux-${PV}
394 -CONFIG_VER=5.4.4.arch1-1
395 -CONFIG_HASH=f101331956bb37080dce191ca789a5c44fac9e69
396 -
397 -DESCRIPTION="Linux kernel built from vanilla upstream sources"
398 -HOMEPAGE="https://www.kernel.org/"
399 -SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/${MY_P}.tar.xz
400 - https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${CONFIG_HASH}
401 - -> linux-${CONFIG_VER}.config"
402 -S=${WORKDIR}/${MY_P}
403 -
404 -LICENSE="GPL-2"
405 -SLOT="${PV}"
406 -KEYWORDS="~amd64"
407 -IUSE="+initramfs"
408 -
409 -# install-DEPEND actually
410 -# note: we need installkernel with initramfs support!
411 -RDEPEND="
412 - || (
413 - sys-kernel/installkernel-gentoo
414 - sys-kernel/installkernel-systemd-boot
415 - )
416 - initramfs? ( sys-kernel/dracut )"
417 -
418 -pkg_pretend() {
419 - mount-boot_pkg_pretend
420 -
421 - ewarn "This is an experimental package. The built kernel and/or initramfs"
422 - ewarn "may not work at all or fail with your bootloader configuration. Please"
423 - ewarn "make sure to keep a backup kernel available before testing it."
424 -}
425 -
426 -src_configure() {
427 - # force ld.bfd if we can find it easily
428 - local LD="$(tc-getLD)"
429 - if type -P "${LD}.bfd" &>/dev/null; then
430 - LD+=.bfd
431 - fi
432 -
433 - MAKEARGS=(
434 - V=1
435 -
436 - HOSTCC="$(tc-getCC)"
437 - HOSTCXX="$(tc-getCXX)"
438 - HOSTCFLAGS="${CFLAGS}"
439 - HOSTLDFLAGS="${LDFLAGS}"
440 -
441 - AS="$(tc-getAS)"
442 - CC="$(tc-getCC)"
443 - LD="${LD}"
444 - AR="$(tc-getAR)"
445 - NM="$(tc-getNM)"
446 - STRIP=":"
447 - OBJCOPY="$(tc-getOBJCOPY)"
448 - OBJDUMP="$(tc-getOBJDUMP)"
449 -
450 - # we need to pass it to override colliding Gentoo envvar
451 - ARCH=x86
452 - )
453 -
454 - cp "${DISTDIR}"/linux-${CONFIG_VER}.config .config || die
455 - # while Arch config is cool, we don't want gcc plugins as they
456 - # break distcc
457 - sed -i -e '/GCC_PLUGIN/d' .config || die
458 - # module compression prevents us from stripping them post-inst
459 - sed -i -e '/MODULE_COMPRESS/d' .config || die
460 - # shove our theft under the carpet!
461 - sed -i -e '/HOSTNAME/s:archlinux:gentoo:' .config || die
462 - restore_config .config
463 -
464 - mkdir -p "${WORKDIR}"/modprep || die
465 - mv .config "${WORKDIR}"/modprep/ || die
466 - emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
467 - emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare
468 - cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die
469 -}
470 -
471 -src_compile() {
472 - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
473 -}
474 -
475 -src_test() {
476 - :
477 -}
478 -
479 -src_install() {
480 - # do not use 'make install' as it behaves differently based
481 - # on what kind of installkernel is installed
482 - emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
483 - INSTALL_MOD_PATH="${ED}" modules_install
484 -
485 - # install headers and prepared objects on top of them
486 - # note: we're using mv rather than doins to save space and time
487 - find -name '*.c' -delete || die
488 - rm -r Documentation || die
489 - dodir /usr/src
490 - cd "${WORKDIR}" || die
491 - mv "${S}" "${ED}"/usr/src/ || die
492 - # strip out-of-source build stuffs from modprep
493 - find modprep -type f '(' \
494 - -name Makefile -o \
495 - -name '*.[ao]' -o \
496 - '(' -name '.*' -a -not -name '.config' ')' \
497 - ')' -delete || die
498 - rm modprep/source || die
499 - cp -pR modprep/. "${ED}/usr/src/linux-${PV}"/ || die
500 -
501 - # install the kernel and files needed for module builds
502 - cp build/{arch/x86/boot/bzImage,System.map,Module.symvers} \
503 - "${ED}/usr/src/linux-${PV}"/ || die
504 -
505 - # fix source tree and build dir symlinks
506 - dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/build
507 - dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/source
508 -
509 - save_config build/.config
510 -}
511 -
512 -pkg_preinst() {
513 - :
514 -}
515 -
516 -pkg_postinst() {
517 - if [[ -z ${ROOT} ]]; then
518 - mount-boot_pkg_preinst
519 -
520 - local fail=
521 -
522 - if use initramfs; then
523 - ebegin "Building initramfs via dracut"
524 - # putting it alongside kernel image as 'initrd' makes
525 - # kernel-install happier
526 - dracut --force "${EROOT}/usr/src/linux-${PV}/initrd" "${PV}"
527 - eend ${?} || die "Building initramfs failed"
528 - fi
529 -
530 - ebegin "Installing the kernel via installkernel"
531 - # note: .config is taken relatively to System.map;
532 - # initrd relatively to bzImage
533 - installkernel "${PV}" \
534 - "${EROOT}/usr/src/linux-${PV}/bzImage" \
535 - "${EROOT}/usr/src/linux-${PV}/System.map"
536 - eend ${?} || fail=1
537 -
538 - [[ ${fail} ]] && die "Installing the kernel failed"
539 - fi
540 -
541 - local symlink_target=$(readlink "${EROOT}"/usr/src/linux)
542 - if [[ ${symlink_target} == linux-[0-9]* ]]; then
543 - local symlink_ver=${symlink_target#linux-}
544 - local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver}
545 - # if the current target is either being replaced, or still
546 - # installed (probably depclean candidate), update the symlink
547 - if has "${symlink_ver}" ${REPLACING_VERSIONS} ||
548 - has_version -r "~${symlink_pkg}"
549 - then
550 - ebegin "Updating /usr/src/linux symlink"
551 - ln -f -n -s linux-${PV} "${EROOT}"/usr/src/linux
552 - eend $?
553 - fi
554 - fi
555 -
556 - savedconfig_pkg_postinst
557 -}
558 -
559 -pkg_prerm() {
560 - :
561 -}
562 -
563 -pkg_postrm() {
564 - rm -f "${EROOT}/usr/src/linux-${PV}/initrd" &&
565 - rmdir --ignore-fail-on-non-empty "${EROOT}/usr/src/linux-${PV}"
566 -}