X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=18f427d424222d02fd9e74b4ade827950679003f;hb=ebbc5a6d36f10612e6b5c2d112b5081fbc8e0831;hp=e651916a186c3907edd3b990f1bc90016908635a;hpb=6f33a32fe38b1ace0ee0b499847a1ce10ed4473b;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index e651916a..18f427d4 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -611,11 +611,16 @@ def insert_content_paths(binary_id, fullpaths, session=None): try: # Insert paths pathcache = {} - for fullpath in fullpaths: - if fullpath.startswith( './' ): - fullpath = fullpath[2:] - session.execute( "INSERT INTO bin_contents ( file, binary_id ) VALUES ( :filename, :id )", { 'filename': fullpath, 'id': binary_id} ) + def generate_path_dicts(): + for fullpath in fullpaths: + if fullpath.startswith( './' ): + fullpath = fullpath[2:] + + yield {'fulename':fullpath, 'id': binary_id } + + session.execute( "INSERT INTO bin_contents ( file, binary_id ) VALUES ( :filename, :id )", + generate_path_dicts() ) session.commit() if privatetrans: @@ -1244,7 +1249,7 @@ def insert_pending_content_paths(package, pca.file = fullpath pca.architecture = arch_id - if isudeb: + if isudeb: pca.type = 8 # gross else: pca.type = 7 # also gross @@ -2228,6 +2233,7 @@ class DBConn(Singleton): mapper(Override, self.tbl_override, properties = dict(suite_id = self.tbl_override.c.suite, suite = relation(Suite), + package = self.tbl_override.c.package, component_id = self.tbl_override.c.component, component = relation(Component), priority_id = self.tbl_override.c.priority,