[python-debian/zack/deb822deps] bugfix: allow "-" in archs for arch-specific deps

Stefano Zacchiroli zack at upsilon.cc
Thu Jun 19 20:43:55 UTC 2008


... otherwise stuff like "foo [!hurd-i386]" fails to parse ...
---
 debian_bundle/deb822.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/debian_bundle/deb822.py b/debian_bundle/deb822.py
index 51f1e14..4a4c875 100644
--- a/debian_bundle/deb822.py
+++ b/debian_bundle/deb822.py
@@ -405,7 +405,7 @@ class PkgRelation(object):
     # just parse as much as we need to split the various parts composing a
     # dependency, checking their correctness wrt policy is out of scope
     __dep_RE = re.compile( \
-            r'^\s*(?P<name>[a-z0-9.+\-]{2,})(\s*\(\s*(?P<relop>[>=<]+)\s*(?P<version>[0-9a-zA-Z:\-+~.]+)\s*\))?(\s*\[(?P<archs>[\s!\w]+)\])?\s*$')
+            r'^\s*(?P<name>[a-z0-9.+\-]{2,})(\s*\(\s*(?P<relop>[>=<]+)\s*(?P<version>[0-9a-zA-Z:\-+~.]+)\s*\))?(\s*\[(?P<archs>[\s!\w\-]+)\])?\s*$')
     __comma_sep_RE = re.compile(r'\s*,\s*')
     __pipe_sep_RE = re.compile(r'\s*\|\s*')
     __blank_sep_RE = re.compile(r'\s*')
-- 
1.5.4.2




More information about the pkg-python-debian-commits mailing list