]> git.donarmstrong.com Git - dak.git/commitdiff
Lock {src,bin}_associations to stop other things writing to them during gps
authorMark Hymers <mhy@debian.org>
Fri, 7 Nov 2014 12:16:44 +0000 (12:16 +0000)
committerMark Hymers <mhy@debian.org>
Fri, 7 Nov 2014 12:16:44 +0000 (12:16 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/generate_packages_sources2.py

index 7eca3c8cacc0460b858e9f2678fcc52f2a68b75c..f3181fd45e1c5200a77598542f36bec3b94919cc 100755 (executable)
@@ -397,6 +397,10 @@ def main():
         else:
             logger.log(['E: ', msg])
 
+    # Lock tables so that nobody can change things underneath us
+    session.execute("LOCK TABLE src_associations IN SHARE MODE")
+    session.execute("LOCK TABLE bin_associations IN SHARE MODE")
+
     for s in suites:
         component_ids = [ c.component_id for c in s.components ]
         if s.untouchable and not force: