From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5C1B0138334 for ; Tue, 2 Oct 2018 09:25:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 89CFEE08C8; Tue, 2 Oct 2018 09:25:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 593A8E08C8 for ; Tue, 2 Oct 2018 09:25:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BF93D335C7F for ; Tue, 2 Oct 2018 09:25:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5C1633AB for ; Tue, 2 Oct 2018 09:25:32 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1538472321.65d88157ecd490f9f8850f45707c79049e2e3b0f.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/linux-info.eclass X-VCS-Directories: eclass/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 65d88157ecd490f9f8850f45707c79049e2e3b0f X-VCS-Branch: master Date: Tue, 2 Oct 2018 09:25:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0a05ba86-bed9-47aa-896b-eb2abc349122 X-Archives-Hash: 5dbda600e263f68c4e3c26ba0fcbe456 commit: 65d88157ecd490f9f8850f45707c79049e2e3b0f Author: Francesco Riosa gmail com> AuthorDate: Tue Oct 2 09:23:38 2018 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Oct 2 09:25:21 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d88157 linux-info.eclass: CONFIG_LOCALVERSION for out of source builds Closes: https://bugs.gentoo.org/662772 Signed-off-by: Thomas Deutschmann gentoo.org> eclass/linux-info.eclass | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index b158e345d16..98ec0ac8dab 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -548,13 +548,22 @@ get_version() { return 1 fi + [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}" + if [ -n "${KV_OUT_DIR}" ]; + then + qeinfo "Found kernel object directory:" + qeinfo " ${KV_OUT_DIR}" + fi + # and if we STILL have not got it, then we better just set it to KV_DIR + KV_OUT_DIR="${KV_OUT_DIR:-${KV_DIR}}" + # Grab the kernel release from the output directory. # TODO: we MUST detect kernel.release being out of date, and 'return 1' from # this function. - if [ -s "${KV_DIR}"/include/config/kernel.release ]; then - KV_LOCAL=$(<"${KV_DIR}"/include/config/kernel.release) - elif [ -s "${KV_DIR}"/.kernelrelease ]; then - KV_LOCAL=$(<"${KV_DIR}"/.kernelrelease) + if [ -s "${KV_OUT_DIR}"/include/config/kernel.release ]; then + KV_LOCAL=$(<"${KV_OUT_DIR}"/include/config/kernel.release) + elif [ -s "${KV_OUT_DIR}"/.kernelrelease ]; then + KV_LOCAL=$(<"${KV_OUT_DIR}"/.kernelrelease) else KV_LOCAL= fi @@ -586,15 +595,6 @@ get_version() { done fi - [ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}" - if [ -n "${KV_OUT_DIR}" ]; - then - qeinfo "Found kernel object directory:" - qeinfo " ${KV_OUT_DIR}" - fi - # and if we STILL have not got it, then we better just set it to KV_DIR - KV_OUT_DIR="${KV_OUT_DIR:-${KV_DIR}}" - # And we should set KV_FULL to the full expanded version KV_FULL="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}"