X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=blobdiff_plain;f=scripts%2Fabi-debian-version.sh;h=a84fe925466650cdebf484045c572651c1d86c49;hp=d87e257e1113e62d49b69449f6af8f0e54196c04;hb=1c56bda830dfa393962ac1c14df408536a750d84;hpb=861292216239a98feb4eba0fe9777f0dfcd6c48a diff --git a/scripts/abi-debian-version.sh b/scripts/abi-debian-version.sh index d87e257e..a84fe925 100755 --- a/scripts/abi-debian-version.sh +++ b/scripts/abi-debian-version.sh @@ -17,16 +17,6 @@ DEB_PACKAGE_VERSION=$(sed -rn 's/^#define LINUX_PACKAGE_ID " Debian (.*)"/\1/p' # Ignore backports part DEB_PACKAGE_VERSION=$(echo "${DEB_PACKAGE_VERSION}" | sed -r 's/~(bpo|deb).*//') -# ckt (Canonical Kernel Team) kernels were used for a while during the jessie -# cycle, their versionning is a bit different. They track the upstream vanilla -# stable updates but they don't update the minor version number and instead add -# an additionnal -cktX. They were all 3.16.7-cktX and after a while the version -# switched back to upstream style at 3.16.36. - -# 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 - # Get package revision DEB_PACKAGE_REVISION=$(echo "${DEB_PACKAGE_VERSION}" | sed -r 's/.*-([^-]+)$/\1/') # Get non-sec update number @@ -35,6 +25,6 @@ DEB_PACKAGE_REVISION_BASE=$(echo "${DEB_PACKAGE_REVISION}" | sed -r 's/^([0-9]+) DEB_PACKAGE_REVISION_SECURITY=$(echo "${DEB_PACKAGE_REVISION}" | sed -rn 's/.*\+(squeeze|deb[0-9]+)+u([0-9]+)$/\2/p') test -n "${DEB_PACKAGE_REVISION_SECURITY}" || DEB_PACKAGE_REVISION_SECURITY=0 # Combine all update numbers into one -DEB_API_VERSION=$((KERNEL_CKT_UPDATE * 10000 + DEB_PACKAGE_REVISION_BASE * 100 + DEB_PACKAGE_REVISION_SECURITY)) +DEB_API_VERSION=$((DEB_PACKAGE_REVISION_BASE * 100 + DEB_PACKAGE_REVISION_SECURITY)) echo ${DEB_API_VERSION}