]> err.no Git - dak/commitdiff
get rid of some w h i t spa c e; and fix the comment in update28
authorMike O'Connor <stew@vireo.org>
Sat, 26 Dec 2009 04:42:33 +0000 (23:42 -0500)
committerMike O'Connor <stew@vireo.org>
Sat, 26 Dec 2009 04:42:33 +0000 (23:42 -0500)
Signed-off-by: Mike O'Connor <stew@vireo.org>
dak/contents.py
dak/dakdb/update28.py
daklib/binary.py

index 53d742270dda4a87f47f6ef1dc3bb1b31a375501..23c160a3b1576ee57745269aaa3de7f12d3f8803 100755 (executable)
@@ -215,7 +215,7 @@ class OutputThread(ContentsWorkThread):
             contents_file.filehandle.write("%s\t%s\n" % (fname,contents_file.filenames[fname]))
         contents_file.sorted_keys = None
         contents_file.filenames.clear()
-    
+
 class GzipThread(ContentsWorkThread):
     def __init__(self, upstream, downstream):
         ContentsWorkThread.__init__(self, upstream, downstream)
@@ -263,18 +263,6 @@ class ContentFile(object):
 
         self.session.close()
 
-#     def ingest(self):
-#         while True:
-#             r = self.results.fetchone()
-#             if not r:
-#                 break
-#             filename, package = r
-#             if self.filenames.has_key(filename):
-#                 self.filenames[filename] += ",%s" % (package)
-#             else:
-#                 self.filenames[filename] = "%s" % (package)
-#         self.session.close()
-
     def open_file(self):
         """
         opens a gzip stream to the contents file
@@ -500,23 +488,16 @@ class Contents(object):
 
         qt = QueryThread(inputtoquery,querytoingest)
         it = IngestThread(querytoingest,ingesttosort)
-# these actually make things worse
-#        it2 = IngestThread(querytoingest,ingesttosort)
-#        it3 = IngestThread(querytoingest,ingesttosort)
-#        it4 = IngestThread(querytoingest,ingesttosort)
         st = SortThread(ingesttosort,sorttooutput)
         ot = OutputThread(sorttooutput,outputtogzip)
         gt = GzipThread(outputtogzip, None)
 
         qt.start()
         it.start()
-#        it2.start()
-#        it3.start()
-#        it2.start()
         st.start()
         ot.start()
         gt.start()
-        
+
         # Get our suites, and the architectures
         for suite in [i.lower() for i in suites]:
             suite_id = get_suite(suite, session).suite_id
@@ -526,7 +507,6 @@ class Contents(object):
             for (arch_id,arch_str) in arch_list:
                 print( "suite: %s, arch: %s time: %s" %(suite_id, arch_id, datetime.datetime.now().isoformat()) )
 
-#                filename = "dists/%s/Contents-%s.gz" % (suite, arch_str)
                 filename = "dists/%s/Contents-%s" % (suite, arch_str)
                 cf = DebContentFile(filename, suite, suite_id, arch_str, arch_id)
                 inputtoquery.enqueue( cf )
@@ -550,54 +530,15 @@ class Contents(object):
 
         qt = QueryThread(inputtoquery,querytoingest)
         it = IngestThread(querytoingest,ingesttosort)
-# these actually make things worse
-#        it2 = IngestThread(querytoingest,ingesttosort)
-#        it3 = IngestThread(querytoingest,ingesttosort)
-#        it4 = IngestThread(querytoingest,ingesttosort)
         st = SortThread(ingesttosort,sorttooutput)
         ot = OutputThread(sorttooutput,outputtogzip)
         gt = GzipThread(outputtogzip, None)
 
         qt.start()
         it.start()
-#        it2.start()
-#        it3.start()
-#        it2.start()
         st.start()
         ot.start()
         gt.start()
-        
-#        for section, fn_pattern in [("debian-installer","dists/%s/Contents-udeb-%s"),
-#                                     ("non-free/debian-installer", "dists/%s/Contents-udeb-nf-%s")]:
-
-#             section_id = DBConn().get_section_id(section) # all udebs should be here)
-#             if section_id != -1:
-
-                
-
-#                 # Get our suites, and the architectures
-#                 for suite in [i.lower() for i in suites]:
-#                     suite_id = DBConn().get_suite_id(suite)
-#                     arch_list = self._arches(suite_id, session)
-
-#                     for arch_id in arch_list:
-
-#                         writer = GzippedContentWriter(fn_pattern % (suite, arch_id[1]))
-#                         try:
-
-#                             results = session.execute("EXECUTE udeb_contents_q(%d,%d,%d)" % (suite_id, udebtype_id, section_id, arch_id))
-
-#                             while True:
-#                                 r = cursor.fetchone()
-#                                 if not r:
-#                                     break
-
-#                                 filename, section, package, arch = r
-#                                 writer.write(filename, section, package)
-#                         finally:
-#                             writer.close()
-
-
 
 
     def generate(self):
index 9e5c066d61de649d264423996bd56f14b4d4d11f..6e73c7508118937ab34dad25166a5c045b4506e7 100644 (file)
@@ -2,7 +2,7 @@
 # coding=utf8
 
 """
-Adding a trainee field to the process-new notes
+keep contents of binary packages in tables so we can generate contents.gz files from dak
 
 @contact: Debian FTP Master <ftpmaster@debian.org>
 @copyright: 2009  Mike O'Connor <stew@debian.org>
index a70aadb943fb2e713a5771f113782384e612d251..3a8d15e21e359ed82e5092238d6bef2971cc2bf1 100644 (file)
@@ -324,13 +324,13 @@ def copy_temporary_contents(binary, bin_association, reject, session=None):
         table = "deb_contents"
     else:
         return False
-    
+
 
     if component.name == "main":
         component_str = ""
     else:
         component_str = component.name + "/"
-        
+
     vals = { 'package':binary.package,
              'version':binary.version,
              'arch':binary.architecture,