From patchwork Fri Aug 15 19:40:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 380412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 23F73140090; Sat, 16 Aug 2014 05:40:54 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XINMl-0002Pv-Ms; Fri, 15 Aug 2014 19:40:47 +0000 Received: from complete.lackof.org ([198.49.126.79]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XINMc-0002PI-Vj for kernel-team@lists.ubuntu.com; Fri, 15 Aug 2014 19:40:39 +0000 Received: from localhost (c-50-170-238-85.hsd1.co.comcast.net [50.170.238.85]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by complete.lackof.org (Postfix) with ESMTPSA id AAEEF1E16792 for ; Fri, 15 Aug 2014 13:40:35 -0600 (MDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: [Packaging] Fix regression with ABI subversions and backport Date: Fri, 15 Aug 2014 13:40:08 -0600 Message-Id: <1408131608-32289-1-git-send-email-dann.frazier@canonical.com> X-Mailer: git-send-email 2.1.0.rc1 X-Virus-Scanned: clamav-milter 0.98.1 at complete.lackof.org X-Virus-Status: Clean X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on complete.lackof.org X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com Tim pointed out that 443b5814ee77f8c9083079ce0e6a0806e087630f broke the parsing of backport versions, such as 8.13~14.10+ppa.1. This should fix it. I used the following script to validate the regular expressions: dannf@fluid:~$ cat test.sh set -e splitver() { local ver="$1" local abinum="$(echo $ver | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$/\1/')" local uploadnum="$(echo $ver | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$/\1/')" echo "$abinum $uploadnum" } do_test() { local ver="$1" local expected="$2" local actual="$(splitver $ver)" if [ "$actual" = "$expected" ]; then echo "PASS: $ver" return 0 fi echo "FAIL: $ver split as $actual" return 1 } do_test "33.58" "33 58" do_test "33.59.58" "33.59 58" do_test "8.13~14.10" "8 13" do_test "8.13~14.10+ppa.1" "8 13" do_test "8.13.99~14.10+ppa.3" "8.13 99" dannf@fluid:~$ ./test.sh PASS: 33.58 PASS: 33.59.58 PASS: 8.13~14.10 PASS: 8.13~14.10+ppa.1 PASS: 8.13.99~14.10+ppa.3 Signed-off-by: dann frazier --- debian/rules.d/0-common-vars.mk | 6 +++--- debian/scripts/misc/getabis | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 629c12e..8530b62 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -61,11 +61,11 @@ ifeq ($(full_build),false) skipdbg=true endif -abinum := $(shell echo $(revision) | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$$/\1/')$(abi_suffix) -prev_abinum := $(shell echo $(prev_revision) | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$$/\1/')$(abi_suffix) +abinum := $(shell echo $(revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix) +prev_abinum := $(shell echo $(prev_revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix) abi_release := $(release)-$(abinum) -uploadnum := $(shell echo $(revision) | sed -r -e 's/[^\+]*\.([^\.]+(\+.*)?$$)/\1/') +uploadnum := $(shell echo $(revision) | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$$/\1/') ifneq ($(full_build),false) uploadnum := $(uploadnum)-Ubuntu endif diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis index 4349499..b6db413 100755 --- a/debian/scripts/misc/getabis +++ b/debian/scripts/misc/getabis @@ -11,7 +11,7 @@ fi ver=$1 revision=$2 -abi=$(echo $revision | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$/\1/') +abi=$(echo $revision | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$/\1/') verabi=$ver-$abi verfull=$ver-$revision