[PATCH 7/9] Fix fragile kernelsourcedir construction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So far, passing --kerneldir=/some/kernel/build could cause broken kernel
source paths as '/build' was incorrectly cut off. Use a smarter
approach.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---

 configure |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index e01ba98..533313e 100755
--- a/configure
+++ b/configure
@@ -91,7 +91,10 @@ arch=${arch%%-*}
 
 # see if we have split build and source directories
 if [ -d "$kerneldir/include2" ]; then
-    kernelsourcedir=${kerneldir%/*}/source
+    kernelsourcedir=$kerneldir/source
+    if [ ! -L "$kernelsourcedir" ]; then
+        kernelsourcedir=${kerneldir%/build*}/source
+    fi
 fi
 
 if [ -n "$no_uname" -a "$want_module" ]; then

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux