Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 02 Oct 2018 09:25:36
Message-Id: 1538472321.65d88157ecd490f9f8850f45707c79049e2e3b0f.whissi@gentoo
1 commit: 65d88157ecd490f9f8850f45707c79049e2e3b0f
2 Author: Francesco Riosa <vivo75 <AT> gmail <DOT> com>
3 AuthorDate: Tue Oct 2 09:23:38 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 2 09:25:21 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d88157
7
8 linux-info.eclass: CONFIG_LOCALVERSION for out of source builds
9
10 Closes: https://bugs.gentoo.org/662772
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 eclass/linux-info.eclass | 26 +++++++++++++-------------
14 1 file changed, 13 insertions(+), 13 deletions(-)
15
16 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
17 index b158e345d16..98ec0ac8dab 100644
18 --- a/eclass/linux-info.eclass
19 +++ b/eclass/linux-info.eclass
20 @@ -548,13 +548,22 @@ get_version() {
21 return 1
22 fi
23
24 + [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
25 + if [ -n "${KV_OUT_DIR}" ];
26 + then
27 + qeinfo "Found kernel object directory:"
28 + qeinfo " ${KV_OUT_DIR}"
29 + fi
30 + # and if we STILL have not got it, then we better just set it to KV_DIR
31 + KV_OUT_DIR="${KV_OUT_DIR:-${KV_DIR}}"
32 +
33 # Grab the kernel release from the output directory.
34 # TODO: we MUST detect kernel.release being out of date, and 'return 1' from
35 # this function.
36 - if [ -s "${KV_DIR}"/include/config/kernel.release ]; then
37 - KV_LOCAL=$(<"${KV_DIR}"/include/config/kernel.release)
38 - elif [ -s "${KV_DIR}"/.kernelrelease ]; then
39 - KV_LOCAL=$(<"${KV_DIR}"/.kernelrelease)
40 + if [ -s "${KV_OUT_DIR}"/include/config/kernel.release ]; then
41 + KV_LOCAL=$(<"${KV_OUT_DIR}"/include/config/kernel.release)
42 + elif [ -s "${KV_OUT_DIR}"/.kernelrelease ]; then
43 + KV_LOCAL=$(<"${KV_OUT_DIR}"/.kernelrelease)
44 else
45 KV_LOCAL=
46 fi
47 @@ -586,15 +595,6 @@ get_version() {
48 done
49 fi
50
51 - [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
52 - if [ -n "${KV_OUT_DIR}" ];
53 - then
54 - qeinfo "Found kernel object directory:"
55 - qeinfo " ${KV_OUT_DIR}"
56 - fi
57 - # and if we STILL have not got it, then we better just set it to KV_DIR
58 - KV_OUT_DIR="${KV_OUT_DIR:-${KV_DIR}}"
59 -
60 # And we should set KV_FULL to the full expanded version
61 KV_FULL="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}"