1 |
commit: b3520bca9d33183c173a402af0bd3040a7240959 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 28 19:40:58 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 28 19:40:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=b3520bca |
7 |
|
8 |
determine_config_file(): add some verbose output |
9 |
|
10 |
...to understand what is happening and why. |
11 |
|
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
gen_configkernel.sh | 20 ++++++++++++++------ |
15 |
1 file changed, 14 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/gen_configkernel.sh b/gen_configkernel.sh |
18 |
index 582d71f..b7fa63e 100755 |
19 |
--- a/gen_configkernel.sh |
20 |
+++ b/gen_configkernel.sh |
21 |
@@ -3,6 +3,7 @@ |
22 |
|
23 |
# Fills variable KERNEL_CONFIG |
24 |
determine_config_file() { |
25 |
+ print_info 2 "Checking for suitable kernel configuration..." |
26 |
for f in \ |
27 |
"${CMD_KERNEL_CONFIG}" \ |
28 |
"/etc/kernels/kernel-config-${ARCH}-${KV}" \ |
29 |
@@ -10,19 +11,26 @@ determine_config_file() { |
30 |
"${GK_SHARE}/arch/${ARCH}/kernel-config-${VER}.${PAT}" \ |
31 |
"${GK_SHARE}/arch/${ARCH}/generated-config" \ |
32 |
"${GK_SHARE}/arch/${ARCH}/kernel-config" \ |
33 |
- "${DEFAULT_KERNEL_CONFIG}" \ |
34 |
- ; do |
35 |
- if [ -n "${f}" -a -f "${f}" ] |
36 |
+ "${DEFAULT_KERNEL_CONFIG}" |
37 |
+ do |
38 |
+ [ -z "${f}" ] && continue |
39 |
+ |
40 |
+ if [ -f "${f}" ] |
41 |
then |
42 |
- if ! grep -sq THIS_CONFIG_IS_BROKEN "$f" |
43 |
+ if grep -sq THIS_CONFIG_IS_BROKEN "$f" |
44 |
then |
45 |
+ print_info 2 "$(getIndent 1)- '${f}' is marked as broken; Skipping..." |
46 |
+ else |
47 |
KERNEL_CONFIG="$f" && break |
48 |
fi |
49 |
+ else |
50 |
+ print_info 2 "$(getIndent 1)- '${f}' not found; Skipping..." |
51 |
fi |
52 |
done |
53 |
+ |
54 |
if [ -z "${KERNEL_CONFIG}" ] |
55 |
then |
56 |
- gen_die 'Error: No kernel .config specified, or file not found!' |
57 |
+ gen_die 'No kernel .config specified, or file not found!' |
58 |
fi |
59 |
|
60 |
KERNEL_CONFIG="$(readlink -f "${KERNEL_CONFIG}")" |
61 |
@@ -30,7 +38,7 @@ determine_config_file() { |
62 |
# Validate the symlink result if any |
63 |
if [ ! -f "${KERNEL_CONFIG}" ] |
64 |
then |
65 |
- gen_die "Error: No kernel .config: symlinked file not found! ($KERNEL_CONFIG)" |
66 |
+ gen_die "No kernel .config: symlinked file '$KERNEL_CONFIG' not found!" |
67 |
fi |
68 |
} |