From patchwork Wed Jul 6 15:10:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 103497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3DA9FB6F6F for ; Thu, 7 Jul 2011 01:10:54 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QeTkN-0006Xe-VM; Wed, 06 Jul 2011 15:10:40 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QeTkL-0006WW-Uy for kernel-team@lists.ubuntu.com; Wed, 06 Jul 2011 15:10:38 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QeTkL-0001t4-QE for ; Wed, 06 Jul 2011 15:10:37 +0000 Received: from c-69-254-227-224.hsd1.ks.comcast.net ([69.254.227.224] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1QeTkL-0005Yk-Gw for kernel-team@lists.ubuntu.com; Wed, 06 Jul 2011 15:10:37 +0000 From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH][kteam-tools] ktl: update debian.py to deal with two-number kernel versions Date: Wed, 6 Jul 2011 10:10:35 -0500 Message-Id: <1309965035-14302-1-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.7.4.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com The version string parsing assumes a kernel version with three numbers. This isn't currently the case for oneiric, so update the regexes to make the third number optional. Signed-off-by: Seth Forshee Acked-by: Brad Figg --- ktl/debian.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ktl/debian.py b/ktl/debian.py index 35dd182..809817e 100644 --- a/ktl/debian.py +++ b/ktl/debian.py @@ -25,11 +25,11 @@ class DebianError(Exception): class Debian: verbose = False debug = False - version_line_rc = compile("^(linux[-\S]*) \(([0-9]+\.[0-9]+\.[0-9]+[-\.][0-9]+\.[0-9]+[~\S]*)\) (\S+); urgency=\S+$") - version_rc = compile("^([0-9]+\.[0-9]+\.[0-9]+)[-\.]([0-9]+)\.([0-9]+)([~\S]*)$") + version_line_rc = compile("^(linux[-\S]*) \(([0-9]+\.[0-9]+(?:\.[0-9]+)?[-\.][0-9]+\.[0-9]+[~\S]*)\) (\S+); urgency=\S+$") + version_rc = compile("^([0-9]+\.[0-9]+(?:\.[0-9]+)?)[-\.]([0-9]+)\.([0-9]+)([~\S]*)$") package_rc = compile("^(linux[-\S])*.*$") - ver_rc = compile("^linux[-\S]* \(([0-9]+\.[0-9]+\.[0-9]+[-\.][0-9]+\.[0-9]+[~a-z0-9]*)\).*$") + ver_rc = compile("^linux[-\S]* \(([0-9]+\.[0-9]+(?:\.[0-9]+)?[-\.][0-9]+\.[0-9]+[~a-z0-9]*)\).*$") # debian_directories #