[Collab-qa-commits] r2312 - udd/udd

Andreas Tille tille at alioth.debian.org
Fri May 11 15:06:25 UTC 2012


Author: tille
Date: 2012-05-11 15:06:25 +0000 (Fri, 11 May 2012)
New Revision: 2312

Modified:
   udd/udd/blends_prospective_gatherer.py
Log:
Record wnpp_type in database


Modified: udd/udd/blends_prospective_gatherer.py
===================================================================
--- udd/udd/blends_prospective_gatherer.py	2012-05-11 14:57:34 UTC (rev 2311)
+++ udd/udd/blends_prospective_gatherer.py	2012-05-11 15:06:25 UTC (rev 2312)
@@ -138,6 +138,7 @@
           changes                      = stanza['changes']
           match = find_itp_re.search(changes)
           sprosp['wnpp'] = 0
+          sprosp['wnpp_type'] = ''
           if match:
             wnpp = match.groups()[2]
             if wnpp not in sprosp['closes']:
@@ -155,7 +156,9 @@
                 wnppbug = RowDictionaries(cur)[0]
                 itpmatch = parse_itp_re.search(wnppbug['title'])
                 if itpmatch:
-                  self.log.info("Source %s: WNPP-type=%s, package name = %s, short description = %s" % (source, itpmatch.groups()[0], itpmatch.groups()[1], itpmatch.groups()[2]))
+                  sprosp['wnpp_type'] = itpmatch.groups()[0]
+                  if source != itpmatch.groups()[1]:
+                    self.log.info("Source name of %s differs from name in %s bug: package name = %s, short description = %s" % (source, itpmatch.groups()[0], itpmatch.groups()[1], itpmatch.groups()[2]))
                 else:
                   self.log.warning("Cannot parse ITP bug %i for package %s: `%s`" % (iwnpp, source, wnppbug['title']))
               else:
@@ -298,7 +301,7 @@
          description, long_description,
          homepage, section, priority,
          vcs_type, vcs_url, vcs_browser,
-         wnpp, license, chlog_date, chlog_version)
+         wnpp, wnpp_type, license, chlog_date, chlog_version)
         VALUES
         ( $1, $2,
           $3, $4, $5,
@@ -307,7 +310,7 @@
           $10, $11,
           $12, $13, $14,
           $15, $16, $17,
-          $18, $19, $20, $21)
+          $18, $19, $20, $21, $22)
         """ %  (my_config['table']))
     pkgquery = """EXECUTE package_insert
       (%(package)s, %(source)s,
@@ -317,7 +320,7 @@
        %(description)s, %(long_description)s,
        %(homepage)s, %(section)s, %(priority)s,
        %(vcs_type)s, %(vcs_url)s, %(vcs_browser)s,
-       %(wnpp)s, %(license)s, %(chlog_date)s, %(chlog_version)s)"""
+       %(wnpp)s, %(wnpp_type)s, %(license)s, %(chlog_date)s, %(chlog_version)s)"""
     try:
       cur.executemany(pkgquery, pkgs)
     except ProgrammingError:




More information about the Collab-qa-commits mailing list