summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorFrancesco Riosa <vivo75@gmail.com>2018-10-02 11:23:38 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-10-02 11:25:21 +0200
commit65d88157ecd490f9f8850f45707c79049e2e3b0f (patch)
tree375b76240e15883646be831fab8b7a42af28d077 /eclass
parentsys-fs/dosfstools: amd64 stable wrt bug #667222 (diff)
downloadgentoo-65d88157ecd490f9f8850f45707c79049e2e3b0f.tar.gz
gentoo-65d88157ecd490f9f8850f45707c79049e2e3b0f.tar.bz2
gentoo-65d88157ecd490f9f8850f45707c79049e2e3b0f.zip
linux-info.eclass: CONFIG_LOCALVERSION for out of source builds
Closes: https://bugs.gentoo.org/662772 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-info.eclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index b158e345d166..98ec0ac8dabe 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}"