Fix: don't clash with older Debian kernel versions
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 19:30:03 +0000 (15:30 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Apr 2015 19:30:03 +0000 (15:30 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
abi-debian-version.sh

index a864a2110b77b56f75a3c4bcd0653e82cca76870..310d6a802fbc228609d81f61daa62d4a702c4d85 100755 (executable)
@@ -16,7 +16,14 @@ DEB_PACKAGE_VERSION=$(sed -rn 's/^#define LINUX_PACKAGE_ID " Debian (.*)"/\1/p'
 DEB_PACKAGE_VERSION=$(echo ${DEB_PACKAGE_VERSION} | sed -r 's/~(bpo|deb).*//')
 # Get -ckt update number, if present
 KERNEL_CKT_UPDATE=$(echo ${DEB_PACKAGE_VERSION} | sed -rn 's/^[0-9]+\.[0-9]+\.[0-9]+-ckt([0-9]+).*/\1/p')
-test -n "${KERNEL_CKT_UPDATE}" || KERNEL_CKT_UPDATE=0
+
+# Only care about the rest if it is a -ckt kernel, making sure we do not
+# clash with older Debian kernels (e.g. Debian 3.2.65-1+deb7u2).
+if [ -z "${KERNEL_CKT_UPDATE}" ]; then
+       echo 0
+       exit 0
+fi
+
 # Get package revision
 DEB_PACKAGE_REVISION=$(echo ${DEB_PACKAGE_VERSION} | sed -r 's/.*-([^-]+)$/\1/')
 # Get non-sec update number
This page took 0.026671 seconds and 4 git commands to generate.