[Collab-qa-commits] r1335 - in udd: . sql udd

lucas at alioth.debian.org lucas at alioth.debian.org
Wed Oct 22 19:44:01 UTC 2008


Author: lucas
Date: 2008-10-22 19:44:01 +0000 (Wed, 22 Oct 2008)
New Revision: 1335

Modified:
   udd/config-standalone.yaml
   udd/sql/setup.sql
   udd/sql/upgrade.sql
   udd/udd/bugs_gatherer.pl
   udd/udd/upload_history_gatherer.py
Log:
bug_presence: use reference to @arch array

Modified: udd/config-standalone.yaml
===================================================================
--- udd/config-standalone.yaml	2008-10-22 18:15:36 UTC (rev 1334)
+++ udd/config-standalone.yaml	2008-10-22 19:44:01 UTC (rev 1335)
@@ -174,7 +174,7 @@
 upload-history:
   type: upload-history
   path: /org/udd.debian.net/tmp/upload-history
-  update-command: if [ ! -e /org/udd.debian.net/tmp/upload-history/ ]; then mkdir /org/udd.debian.net/tmp/upload-history/; fi; rm -rf /org/udd.debian.net/tmp/upload-history/*; wget -q -r --no-parent -nd -A debian-devel-* -P /org/udd.debian.net/tmp/upload-history http://qa.debian.org/~filippo/ddc/
+  update-command: if [ ! -e /org/udd.debian.net/tmp/upload-history/ ]; then mkdir /org/udd.debian.net/tmp/upload-history/; fi; lftp -c 'mirror -e -P http://qa.debian.org/~filippo/ddc/ /org/udd.debian.net/tmp/upload-history'
   schema: upload_history
   table: upload_history
 

Modified: udd/sql/setup.sql
===================================================================
--- udd/sql/setup.sql	2008-10-22 18:15:36 UTC (rev 1334)
+++ udd/sql/setup.sql	2008-10-22 19:44:01 UTC (rev 1335)
@@ -324,6 +324,7 @@
 CREATE TABLE upload_history
  (id serial, package text, version text, date timestamp with time zone,
  changed_by text, maintainer text, nmu boolean, signed_by text, key_id text,
+ fingerprint text,
  PRIMARY KEY (id));
 
 CREATE TABLE upload_history_architecture

Modified: udd/sql/upgrade.sql
===================================================================
--- udd/sql/upgrade.sql	2008-10-22 18:15:36 UTC (rev 1334)
+++ udd/sql/upgrade.sql	2008-10-22 19:44:01 UTC (rev 1335)
@@ -21,3 +21,5 @@
 ALTER TABLE sources add maintainer_email text;
 ALTER TABLE ubuntu_sources add maintainer_name text;
 ALTER TABLE ubuntu_sources add maintainer_email text;
+-- 2008-10-05: add fingerprint column in upload_history
+ALTER TABLE upload_history add fingerprint text;

Modified: udd/udd/bugs_gatherer.pl
===================================================================
--- udd/udd/bugs_gatherer.pl	2008-10-22 18:15:36 UTC (rev 1334)
+++ udd/udd/bugs_gatherer.pl	2008-10-22 19:44:01 UTC (rev 1335)
@@ -222,19 +222,19 @@
 			$present_in_stable =
 				bug_presence(bug => $bug_nr, status => \%bug,
 							 dist => 'stable',
-							 arch => @archs);
+							 arch => \@archs);
 			$present_in_testing =
 				bug_presence(bug => $bug_nr, status => \%bug,
 							 dist => 'testing',
-							 arch => @archs);
+							 arch => \@archs);
 			$present_in_unstable =
 				bug_presence(bug => $bug_nr, status => \%bug,
 							 dist => 'unstable',
-							 arch => @archs);
+							 arch => \@archs);
 			$present_in_experimental =
 				bug_presence(bug => $bug_nr, status => \%bug,
 							 dist => 'experimental',
-							 arch => @archs);
+							 arch => \@archs);
 
 			if(!defined($present_in_stable) or !defined($present_in_unstable) or !defined($present_in_testing) or !defined($present_in_experimental)) {
 				print "NUMBER: $bug_nr\n";

Modified: udd/udd/upload_history_gatherer.py
===================================================================
--- udd/udd/upload_history_gatherer.py	2008-10-22 18:15:36 UTC (rev 1334)
+++ udd/udd/upload_history_gatherer.py	2008-10-22 19:44:01 UTC (rev 1335)
@@ -34,8 +34,8 @@
     cursor.execute("DELETE FROM " + self.my_config['table'])
 
     cursor.execute("PREPARE uh_insert AS INSERT INTO %s (id, package, \
-        version, date, changed_by, maintainer, nmu, signed_by, key_id) VALUES \
-	($1, $2, $3, $4, $5, $6, $7, $8, $9)" % self.my_config['table'])
+        version, date, changed_by, maintainer, nmu, signed_by, key_id, fingerprint) VALUES \
+	($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)" % self.my_config['table'])
     cursor.execute("PREPARE uh_arch_insert AS INSERT INTO %s (id, \
     	architecture) VALUES \
 	($1, $2)" % (self.my_config['table'] + '_architecture'))
@@ -43,7 +43,7 @@
     	VALUES ($1, $2)" % (self.my_config['table'] + '_closes'))
 
     id = 0
-    for name in glob(path + '/debian-devel-*'):
+    for name in glob(path + '/debian-devel-changes.*'):
       # print name
       f = None
       if name.endswith(".gz"):
@@ -52,6 +52,7 @@
 	f = open(name)
       
       current = {'id': id}
+      current['Fingerprint'] = 'N/A' # hack: some entries don't have fp
       last_field = None
       line_count = 0
       for line in f:
@@ -61,7 +62,7 @@
 	if line == '':
 	  try:
 	    query = "EXECUTE uh_insert(%(id)s, %(Source)s, %(Version)s, %(Date)s, %(Changed-By)s, \
-		%(Maintainer)s, %(NMU)s, %(Key)s, %(Signed-By)s)"
+		%(Maintainer)s, %(NMU)s, %(Signed-By)s, %(Key)s, %(Fingerprint)s)"
 	    cursor.execute(query, current)
 	    for arch in set(current['Architecture'].split()):
 	      current['arch'] = arch
@@ -78,6 +79,7 @@
 	    #raise
 	  id += 1
 	  current = {'id': id}
+	  current['Fingerprint'] = 'N/A' # hack: some entries don't have fp
 	  last_field = None
 	  continue
 




More information about the Collab-qa-commits mailing list