linux-info: Fix looking up /lib/modules/xxx/build
The current logic prefixes $ROOT everywhere the lookup happens, except
one place. This patch fixes that.
BUG=None
TEST=None
Change-Id: I18987618e957913b1ed8f02d3e8ce81a0f63bc2d
Reviewed-on: https://chromium-review.googlesource.com/274596
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index adc1878..c78cce7 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -523,7 +523,7 @@
# but before we do this, we need to find if we use a different object directory.
# This *WILL* break if the user is using localversions, but we assume it was
# caught before this if they are.
- OUTPUT_DIR="${OUTPUT_DIR:-/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build}"
+ OUTPUT_DIR="${OUTPUT_DIR:-${ROOT}/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build}"
[ -h "${OUTPUT_DIR}" ] && KV_OUT_DIR="$(readlink -f ${OUTPUT_DIR})"
[ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"