1 |
commit: 3abb33bf0e12e38f453e262392572b0c6d47ea7c |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 28 20:37:17 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 28 20:37:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=3abb33bf |
7 |
|
8 |
genkernel: tell user that shown kernel version is subject to change |
9 |
|
10 |
When you start with fresh (unused) kernel sources, we will get Kernel |
11 |
Version from KERNEL_DIR. If you already have compiled that KV, genkernel |
12 |
maybe use your existing configuration from /etc/kernels (depends on other |
13 |
settings like --mrproper). |
14 |
|
15 |
Once your new kernel was built and you are saving configs (--save-config), |
16 |
we will save the used configuration in /etc/kernels/kernel-config-${ARCH}-${KV}. |
17 |
|
18 |
If you used --menuconfig during genkernel run to change kernel options like |
19 |
CONFIG_LOCALVERSION or CONFIG_LOCALVERSION_AUTO or have modified kernel's |
20 |
Makefile manually to change version, KV is subject to change once |
21 |
genkernel has called 'make prepare'. |
22 |
|
23 |
With this change we will tell user when KV has changed to end confusion like |
24 |
shown in bug 521778. |
25 |
|
26 |
Closes: https://bugs.gentoo.org/521778 |
27 |
Closes: https://bugs.gentoo.org/352787 |
28 |
Closes: https://bugs.gentoo.org/263927 |
29 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
30 |
|
31 |
genkernel | 28 ++++++++++++++++++++++------ |
32 |
1 file changed, 22 insertions(+), 6 deletions(-) |
33 |
|
34 |
diff --git a/genkernel b/genkernel |
35 |
index 44c34ba..65b7820 100755 |
36 |
--- a/genkernel |
37 |
+++ b/genkernel |
38 |
@@ -158,9 +158,23 @@ check_distfiles |
39 |
|
40 |
dump_debugcache |
41 |
|
42 |
+KERNCACHE_IS_VALID="no" |
43 |
+if [ "${KERNCACHE}" != "" ] |
44 |
+then |
45 |
+ gen_kerncache_is_valid |
46 |
+fi |
47 |
+ |
48 |
NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." |
49 |
print_info 1 ".. with config file ${KERNEL_CONFIG}" |
50 |
|
51 |
+if isTrue "${BUILD_KERNEL}" && ! isTrue "${KERNCACHE_IS_VALID}" |
52 |
+then |
53 |
+ print_info 1 "" |
54 |
+ print_info 1 "Note: The version above is subject to change (depends on config and status of kernel sources)." |
55 |
+ print_info 1 "" |
56 |
+fi |
57 |
+ |
58 |
+ |
59 |
# Check if BOOTDIR is mounted |
60 |
if ! isTrue "${CMD_INSTALL}" |
61 |
then |
62 |
@@ -203,12 +217,6 @@ else |
63 |
fi |
64 |
fi |
65 |
|
66 |
-KERNCACHE_IS_VALID="no" |
67 |
-if [ "${KERNCACHE}" != "" ] |
68 |
-then |
69 |
- gen_kerncache_is_valid |
70 |
-fi |
71 |
- |
72 |
if isTrue "${BUILD_KERNEL}" && ! isTrue "${KERNCACHE_IS_VALID}" |
73 |
then |
74 |
# Configure kernel |
75 |
@@ -224,6 +232,14 @@ then |
76 |
|
77 |
# KV may have changed due to the configuration |
78 |
get_KV |
79 |
+ if [ -f "${TEMP}/.old_kv" ] |
80 |
+ then |
81 |
+ old_KV=$(cat "${TEMP}/.old_kv") |
82 |
+ print_info 1 "Kernel version has changed (probably due to config change) since genkernel start:" |
83 |
+ print_info 1 "We are now building Linux kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." |
84 |
+ else |
85 |
+ print_info 2 "Kernel version has not changed since genkernel start." |
86 |
+ fi |
87 |
|
88 |
compile_kernel |