[Pkg-ocaml-maint-commits] r5171 - /trunk/tools/ocaml-debian-status/debian-ocaml-status.py

zack at users.alioth.debian.org zack at users.alioth.debian.org
Thu Feb 14 15:35:37 UTC 2008


Author: zack
Date: Thu Feb 14 15:35:37 2008
New Revision: 5171

URL: http://svn.debian.org/wsvn/?sc=1&rev=5171
Log:
fix a regexp which used to make some packages not appear in the status page

Modified:
    trunk/tools/ocaml-debian-status/debian-ocaml-status.py

Modified: trunk/tools/ocaml-debian-status/debian-ocaml-status.py
URL: http://svn.debian.org/wsvn/trunk/tools/ocaml-debian-status/debian-ocaml-status.py?rev=5171&op=diff
==============================================================================
--- trunk/tools/ocaml-debian-status/debian-ocaml-status.py (original)
+++ trunk/tools/ocaml-debian-status/debian-ocaml-status.py Thu Feb 14 15:35:37 2008
@@ -23,8 +23,8 @@
 from genshi.template import TemplateLoader
 
 ocaml_dep_RE = \
-    re.compile(r'\bocaml(-base)?(-nox)?\b(\s*\(\s*>=\s*(?P<version>\d+(\.\d+)*)\s*\))?')
-ocaml_virtdep_RE = re.compile(r'\bocaml(-base)?(-nox)?-(?P<version>\d+(\.\d+)*)\b')
+    re.compile(r'(^|,)\s*ocaml(-base)?(-nox)?(\s*\(\s*>=\s*(?P<version>\d+([\.\-+~]\d+)*)\s*\))?')
+ocaml_virtdep_RE = re.compile(r'(^|,)\s*ocaml(-base)?(-nox)?-(?P<version>\d+([\.\-+~]\d+)*)')
 
 def patch_pkg_dict(entry):
     if not isinstance(entry, dict): # backward compatibility for debian_support
@@ -63,21 +63,22 @@
 
     for src in sources:
         src = patch_pkg_dict(src)
+        name = src['package']
         bd_match, bdi_match = None, None
         if src.has_key('build-depends'):
             bd_match = ocaml_dep_RE.search(src['build-depends'])
         if src.has_key('build-depends-indep'):
             bdi_match = ocaml_dep_RE.search(src['build-depends-indep'])
 
-        if src['package'] == 'ocaml':
-            yield src['package'], src['version'], None
+        if name == 'ocaml':
+            yield name, src['version'], None
         elif bd_match or bdi_match:
             ocaml_version = None
             if bd_match and bd_match.groupdict()['version']:
                 ocaml_version = bd_match.groupdict()['version']
             elif bdi_match and bdi_match.groupdict()['version']:
                 ocaml_version = bdi_match.groupdict()['version']
-            yield src['package'], src['version'], ocaml_version
+            yield name, src['version'], ocaml_version
 
 def eval_status(pkg):
     status = None




More information about the Pkg-ocaml-maint-commits mailing list