[PATCH 1/5] build-sys: fix empty package release number

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

 



From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>

Was broken for major releases since b0e6b25e:
  $ blkid -V
  blkid from util-linux 2.28  (libblkid 2.28., 12-Apr-2016)

Now we also set 0 in this case, like:
  $ blkid -V
  blkid from util-linux 2.30  (libblkid 2.30.0, 12-Apr-2016)

Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
---
 configure.ac | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1bd7d2e..f3521ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,10 +23,8 @@ dnl version details from <major>.<minor>[-<suffix>]
 PACKAGE_VERSION_MAJOR=$(echo $PACKAGE_VERSION | awk -F. '{print $1}')
 PACKAGE_VERSION_MINOR=$(echo $PACKAGE_VERSION | awk -F. '{print $2}' \
 					      | awk -F- '{print $1}')
-
-PACKAGE_VERSION_RELEASE=$(echo $PACKAGE_VERSION | awk -F. '{print $3}' \
-						| sed 's/.*@<:@^@<:@:digit:@:>@@:>@.*/0/')
-
+PACKAGE_VERSION_RELEASE=$(echo $PACKAGE_VERSION | awk -F. '{
+                                       print $3 ~ /^@<:@[0-9]@:>@+$/ ? $3 : 0}')
 
 dnl libblkid version
 LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
-- 
1.8.5.6

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



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux