1 |
commit: 9418b9d65972045d2087b24b214bad1ecc8ab197 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 27 21:30:15 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 28 21:19:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9418b9d6 |
7 |
|
8 |
genkernel: Normalize output |
9 |
|
10 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
11 |
|
12 |
gen_package.sh | 8 ++++++-- |
13 |
genkernel | 23 +++++++++++++++++------ |
14 |
2 files changed, 23 insertions(+), 8 deletions(-) |
15 |
|
16 |
diff --git a/gen_package.sh b/gen_package.sh |
17 |
index 4a1ca43..0240b80 100755 |
18 |
--- a/gen_package.sh |
19 |
+++ b/gen_package.sh |
20 |
@@ -174,6 +174,7 @@ gen_kerncache() { |
21 |
} |
22 |
|
23 |
gen_kerncache_extract_kernel() { |
24 |
+ print_info 1 "Extracting kerncache kernel from '${KERNCACHE}' ..." |
25 |
"${TAR_COMMAND}" -xf "${KERNCACHE}" -C "${TEMP}" \ |
26 |
|| gen_die "Failed to extract '${KERNCACHE}' to '${TEMP}'!" |
27 |
|
28 |
@@ -238,6 +239,7 @@ gen_kerncache_is_valid() { |
29 |
|
30 |
if [ -e "${TEMP}/config-${ARCH}-${KV}" -a -e "${TEMP}/kernel-${ARCH}-${KV}" ] |
31 |
then |
32 |
+ print_info 1 '' 1 0 |
33 |
print_info 1 'Valid kerncache found; No sources will be used ...' |
34 |
KERNCACHE_IS_VALID="yes" |
35 |
fi |
36 |
@@ -262,9 +264,11 @@ gen_kerncache_is_valid() { |
37 |
|
38 |
if [[ "${test1}" == "${test2}" ]] |
39 |
then |
40 |
+ print_info 1 '' 1 0 |
41 |
print_info 1 "Valid kerncache '${KERNCACHE}' found; Will skip kernel build step ..." |
42 |
KERNCACHE_IS_VALID="yes" |
43 |
else |
44 |
+ print_info 1 '' 1 0 |
45 |
print_info 1 "Kerncache kernel config differs from '${KERNEL_CONFIG}'; Ignoring outdated kerncache '${KERNCACHE}' ..." |
46 |
fi |
47 |
else |
48 |
@@ -274,14 +278,14 @@ gen_kerncache_is_valid() { |
49 |
invalid_reason="Kernel config '${KERNEL_CONFIG}' does not exist -- cannot validate kerncache" |
50 |
fi |
51 |
|
52 |
+ print_info 1 '' 1 0 |
53 |
print_info 1 "${invalid_reason}; Ignorning kerncache '${KERNCACHE}' ..." |
54 |
fi |
55 |
fi |
56 |
else |
57 |
+ print_warning 1 '' 1 0 |
58 |
print_warning 1 "Kerncache '${KERNCACHE}' does not exist (yet?); Ignoring ..." |
59 |
fi |
60 |
|
61 |
- echo |
62 |
- |
63 |
export KERNCACHE_IS_VALID |
64 |
} |
65 |
|
66 |
diff --git a/genkernel b/genkernel |
67 |
index 58d4cf3..34de18f 100755 |
68 |
--- a/genkernel |
69 |
+++ b/genkernel |
70 |
@@ -103,7 +103,6 @@ NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}" |
71 |
print_info 1 "Using genkernel configuration from '${_GENKERNEL_CONF}' ..." |
72 |
unset _GENKERNEL_CONF |
73 |
print_info 1 "Running with options: ${GK_OPTIONS}" |
74 |
-print_info 1 '' 1 0 |
75 |
|
76 |
# Save any customizations of MODULES_* first. |
77 |
override_module_vars="$(compgen -A variable |grep '^MODULES_')" |
78 |
@@ -118,6 +117,7 @@ determine_real_args |
79 |
|
80 |
if isTrue "${BUILD_RAMDISK}" && ! isTrue "${SANDBOX}" |
81 |
then |
82 |
+ print_warning 1 '' 1 0 |
83 |
print_warning 1 "${BOLD}WARNING:${NORMAL} Will build initramfs ${BOLD}without${NORMAL} sandbox support " 0 |
84 |
|
85 |
SANDBOX_WARNING_TIMER=0 |
86 |
@@ -129,9 +129,9 @@ then |
87 |
done |
88 |
|
89 |
print_warning 1 '' 1 0 |
90 |
- print_warning 1 '' 1 0 |
91 |
fi |
92 |
|
93 |
+print_info 2 '' 1 0 |
94 |
print_info 2 "Sourcing default modules_load from '${GK_SHARE}/defaults/modules_load' ..." |
95 |
source "${GK_SHARE}/defaults/modules_load" || gen_die "Could not read '${GK_SHARE}/defaults/modules_load'!" |
96 |
|
97 |
@@ -186,6 +186,7 @@ then |
98 |
gen_kerncache_is_valid |
99 |
fi |
100 |
|
101 |
+print_info 1 '' 1 0 |
102 |
print_info 1 "Working with Linux kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}" |
103 |
print_info 1 "Using kernel config file '${KERNEL_CONFIG}' ..." |
104 |
|
105 |
@@ -255,8 +256,13 @@ fi |
106 |
|
107 |
if isTrue "${KERNCACHE_IS_VALID}" |
108 |
then |
109 |
+ if ! isTrue "${BUILD_STATIC}" |
110 |
+ then |
111 |
+ print_info 1 '' 1 0 |
112 |
+ gen_kerncache_extract_modules |
113 |
+ fi |
114 |
+ |
115 |
print_info 1 '' 1 0 |
116 |
- ! isTrue "${BUILD_STATIC}" && gen_kerncache_extract_modules |
117 |
gen_kerncache_extract_config |
118 |
fi |
119 |
|
120 |
@@ -328,11 +334,16 @@ then |
121 |
fi |
122 |
fi |
123 |
|
124 |
-if [ -n "${MINKERNPACKAGE}" -o -n "${MODULESPACKAGE}" ] |
125 |
+if [ -n "${MINKERNPACKAGE}" ] |
126 |
+then |
127 |
+ print_info 1 '' 1 0 |
128 |
+ gen_minkernpackage |
129 |
+fi |
130 |
+ |
131 |
+if [ -n "${MODULESPACKAGE}" ] |
132 |
then |
133 |
print_info 1 '' 1 0 |
134 |
- [ -n "${MINKERNPACKAGE}" ] && gen_minkernpackage |
135 |
- [ -n "${MODULESPACKAGE}" ] && gen_modulespackage |
136 |
+ gen_modulespackage |
137 |
fi |
138 |
|
139 |
if isTrue "${BUILD_KERNEL}" |