ktl: update debian.py to deal with two-number kernel versions
On 07/06/2011 08:10 AM, Seth Forshee wrote:
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<seth.forshee@canonical.com>
---
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
#
Acked-by: Brad Figg <brad.figg@canonical.com>
--
Brad Figg brad.figg@canonical.com http://www.canonical.com
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
|