]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/kbuild-setlocalversion-print-error-to-stderr.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / kbuild-setlocalversion-print-error-to-stderr.patch
1 From 78283edf2c01c38eb840a3de5ffd18fe2992ab64 Mon Sep 17 00:00:00 2001
2 From: Wolfram Sang <wsa@the-dreams.de>
3 Date: Mon, 6 Jun 2016 21:00:38 +0200
4 Subject: kbuild: setlocalversion: print error to STDERR
5
6 From: Wolfram Sang <wsa@the-dreams.de>
7
8 commit 78283edf2c01c38eb840a3de5ffd18fe2992ab64 upstream.
9
10 I tried to use 'make O=...' from an unclean source tree. This triggered
11 the error path of setlocalversion. But by printing to STDOUT, it created
12 a broken localversion which then caused another (unrelated) error:
13
14 "4.7.0-rc2Error: kernelrelease not valid - run make prepare to update it" exceeds 64 characters
15
16 After printing to STDERR, the true build error gets displayed later:
17
18 /home/wsa/Kernel/linux is not clean, please run 'make mrproper'
19 in the '/home/wsa/Kernel/linux' directory.
20
21 Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
22 Signed-off-by: Michal Marek <mmarek@suse.com>
23 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26 ---
27 scripts/setlocalversion | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 --- a/scripts/setlocalversion
31 +++ b/scripts/setlocalversion
32 @@ -143,7 +143,7 @@ fi
33 if test -e include/config/auto.conf; then
34 . include/config/auto.conf
35 else
36 - echo "Error: kernelrelease not valid - run 'make prepare' to update it"
37 + echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
38 exit 1
39 fi
40