Gentoo Archives: gentoo-dev

From: Francesco Riosa <vivo75@×××××.com>
To: gentoo development <gentoo-dev@l.g.o>
Subject: [gentoo-dev] Re: commit 50078fbbb39667734 for linux-info.eclass
Date: Mon, 06 Aug 2018 17:29:38
Message-Id: 65073348-fbf3-b649-c99f-2435ee40bb07@gmail.com
In Reply to: [gentoo-dev] commit 50078fbbb39667734 for linux-info.eclass by Francesco Riosa
1 Il 06/08/2018 17:13, Francesco Riosa ha scritto:
2 ...
3 > Please revert the commit, after that we should discuss here an
4 > appropriate fix, with this statement I'm offering to test it for vanilla
5 > kernel, out of source builds.
6 tried to fix it and it seem to work, so I retract the revert request and
7 instead ask for review of this patch:
8
9 From de7bec54c51361ae2aecbfa06a9cf3300a338dca Mon Sep 17 00:00:00 2001
10 From: Francesco Riosa <vivo75@×××××.com>
11 Date: Mon, 6 Aug 2018 19:18:05 +0200
12 Subject: [PATCH] linux-info.eclass: CONFIG_LOCALVERSION for out of source
13  builds
14
15 Closes: https://bugs.gentoo.org/662772
16 ---
17  eclass/linux-info.eclass | 26 +++++++++++++-------------
18  1 file changed, 13 insertions(+), 13 deletions(-)
19
20 diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
21 index b158e345d16..98ec0ac8dab 100644
22 --- a/eclass/linux-info.eclass
23 +++ b/eclass/linux-info.eclass
24 @@ -548,13 +548,22 @@ get_version() {
25          return 1
26      fi
27  
28 +    [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
29 +    if [ -n "${KV_OUT_DIR}" ];
30 +    then
31 +        qeinfo "Found kernel object directory:"
32 +        qeinfo "    ${KV_OUT_DIR}"
33 +    fi
34 +    # and if we STILL have not got it, then we better just set it to KV_DIR
35 +    KV_OUT_DIR="${KV_OUT_DIR:-${KV_DIR}}"
36 +
37      # Grab the kernel release from the output directory.
38      # TODO: we MUST detect kernel.release being out of date, and
39 'return 1' from
40      # this function.
41 -    if [ -s "${KV_DIR}"/include/config/kernel.release ]; then
42 -        KV_LOCAL=$(<"${KV_DIR}"/include/config/kernel.release)
43 -    elif [ -s "${KV_DIR}"/.kernelrelease ]; then
44 -        KV_LOCAL=$(<"${KV_DIR}"/.kernelrelease)
45 +    if [ -s "${KV_OUT_DIR}"/include/config/kernel.release ]; then
46 +        KV_LOCAL=$(<"${KV_OUT_DIR}"/include/config/kernel.release)
47 +    elif [ -s "${KV_OUT_DIR}"/.kernelrelease ]; then
48 +        KV_LOCAL=$(<"${KV_OUT_DIR}"/.kernelrelease)
49      else
50          KV_LOCAL=
51      fi
52 @@ -586,15 +595,6 @@ get_version() {
53          done
54      fi
55  
56 -    [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
57 -    if [ -n "${KV_OUT_DIR}" ];
58 -    then
59 -        qeinfo "Found kernel object directory:"
60 -        qeinfo "    ${KV_OUT_DIR}"
61 -    fi
62 -    # and if we STILL have not got it, then we better just set it to KV_DIR
63 -    KV_OUT_DIR="${KV_OUT_DIR:-${KV_DIR}}"
64 -
65      # And we should set KV_FULL to the full expanded version
66      KV_FULL="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}"
67  
68 --
69 2.18.0

Attachments

File name MIME type
0001-linux-info.eclass-CONFIG_LOCALVERSION-for-out-of-sou.patch text/x-patch

Replies

Subject Author
[gentoo-dev] Re: commit 50078fbbb39667734 for linux-info.eclass Thomas Deutschmann <whissi@g.o>