From: Simon Wilkinson Date: Wed, 12 Oct 2011 13:44:37 +0000 (-0400) Subject: linux: makesrpm should cope with releases with letters X-Git-Tag: upstream/1.6.1.pre1^2~175 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a4333a6bc1971a8f31a117998cdbf48c2ef99b7e;p=packages%2Fo%2Fopenafs.git linux: makesrpm should cope with releases with letters don't just deal with numbered releases. Reviewed-on: http://gerrit.openafs.org/5602 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 69f54d474827548375c0bd39a87ac7ec376b6d9b) Change-Id: I3e433fe4b7f1b2dbedcfc70215ba114de16900c4 Reviewed-on: http://gerrit.openafs.org/5710 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index 52bd88e6d..54193d0b7 100755 --- a/src/packaging/RedHat/makesrpm.pl +++ b/src/packaging/RedHat/makesrpm.pl @@ -82,10 +82,14 @@ if ($afsversion=~m/(.*)(pre[0-9]+)/) { $linuxrel=1; } -if ($afsversion=~m/-([0-9]+)-(g[a-f0-9]+)$/) { - $linuxrel.=".$1.$2"; +if ($afsversion=~m/(.*)-([0-9]+)-(g[a-f0-9]+)$/) { + $linuxver = $1 if ($linuxver eq $afsversion); + $linuxrel.=".$2.$3"; } +print "Linux release is $linuxrel\n"; +print "Linux version is $linuxver\n"; + # Figure out a major, minor and release so that we know which version we're # building, and therefore what the srpm is going to be called $linuxver=~/([0-9]+)\.([0-9]+)\.([0-9]+)/;