[linux-tools] 12/13: debian/lib/python/debian_linux/debian.py: Change package version regexp to match linux package

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Nov 5 22:56:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch jessie
in repository linux-tools.

commit 270bd0f48e2180886dc38781703033953c0650e4
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Wed Nov 4 14:37:59 2015 +0000

    debian/lib/python/debian_linux/debian.py: Change package version regexp to match linux package
---
 debian/changelog                         |  2 ++
 debian/lib/python/debian_linux/debian.py | 20 +++++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 01e8912..36998dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ linux-tools (3.16-4) UNRELEASED; urgency=medium
     - Update .gitignore files
     - debian/control: Update Vcs-* fields
     - debian/rules: Exclude .git from maintainerclean rule
+  * debian/lib/python/debian_linux/debian.py: Change package version regexp
+    to match linux package
 
  -- Ben Hutchings <ben at decadent.org.uk>  Wed, 04 Nov 2015 12:49:40 +0000
 
diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py
index a577526..3778c6b 100644
--- a/debian/lib/python/debian_linux/debian.py
+++ b/debian/lib/python/debian_linux/debian.py
@@ -111,8 +111,9 @@ class VersionLinux(Version):
     \d+\.\d+
 )
 (?P<update>
-    \.\d+
-)?
+    (?:\.\d+)?
+    (?:-[a-z]+\d+)?
+)
 (?:
     ~
     (?P<modifier>
@@ -130,13 +131,20 @@ class VersionLinux(Version):
 (\.\d+)?
 (?:
     (?P<revision_experimental>
-        ~experimental\.\d+
+        ~exp\d+
     )
     |
+    (?P<revision_security>
+        [~+]deb\d+u\d+
+    )?
+    (?P<revision_backports>
+        ~bpo\d+\+\d+
+    )?
+    |
     (?P<revision_other>
         [^-]+
     )
-)?
+)
 $
 """
     _version_linux_re = re.compile(_version_linux_rules, re.X)
@@ -154,9 +162,11 @@ $
             self.linux_upstream = u'-'.join((d['version'], d['modifier']))
         else:
             self.linux_upstream = d['version']
-        self.linux_upstream_full = self.linux_upstream + (d['update'] or u'')
+        self.linux_upstream_full = self.linux_upstream + d['update']
         self.linux_dfsg = d['dfsg']
         self.linux_revision_experimental = match.group('revision_experimental') and True
+        self.linux_revision_security = match.group('revision_security') and True
+        self.linux_revision_backports = match.group('revision_backports') and True
         self.linux_revision_other = match.group('revision_other') and True
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-tools.git



More information about the Kernel-svn-changes mailing list