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

Lucas Nussbaum lucas at alioth.debian.org
Sat Sep 25 14:05:34 UTC 2010


Author: lucas
Date: 2010-09-25 14:05:29 +0000 (Sat, 25 Sep 2010)
New Revision: 1813

Modified:
   udd/udd/hints_gatherer.py
Log:
number of days for age-days

Modified: udd/udd/hints_gatherer.py
===================================================================
--- udd/udd/hints_gatherer.py	2010-09-25 14:04:59 UTC (rev 1812)
+++ udd/udd/hints_gatherer.py	2010-09-25 14:05:29 UTC (rev 1813)
@@ -28,6 +28,10 @@
         self.pkgs = []
         self.versionmap = {} # original versions on the hint
         self.archmap = {}
+        self.arg = None
+        if self.type == 'age-days':
+            self.arg = args[0]
+            args = args[1:]
 
         for pkg in args:
             if '/' in pkg:
@@ -99,14 +103,15 @@
     hints = self.parse_hints(path)
 
     cursor = self.cursor()
-    cursor.execute("PREPARE h_insert AS INSERT INTO hints (source, version, architecture, type, file, comment) VALUES ($1, $2 , $3, $4, $5, $6)")
+    cursor.execute("PREPARE h_insert AS INSERT INTO hints (source, version, architecture, type, argument, file, comment) VALUES ($1, $2 , $3, $4, $5, $6, $7)")
     cursor.execute("DELETE FROM hints")
-    query = "EXECUTE h_insert(%(source)s, %(version)s, %(arch)s, %(type)s, %(file)s, %(comment)s)"
+    query = "EXECUTE h_insert(%(source)s, %(version)s, %(arch)s, %(type)s, %(argument)s, %(file)s, %(comment)s)"
     hs = []
     for hint in hints:
         h = {}
         h['file'] = hint[1]
         h['comment'] = hint[2]
+        h['argument'] = hint[0].arg
         h['type'] = hint[0].type
         for src in hint[0].pkgs:
             h['source'] = src




More information about the Collab-qa-commits mailing list